Skip to content

Commit

Permalink
chore(Release): 2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
skick1234 committed Jun 12, 2024
1 parent 9e3fe6f commit 8e5a65c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"dot-location": ["error", "property"],
"dot-notation": "error",
"eqeqeq": "error",
"no-console": "error",
"no-empty-function": "error",
"no-floating-decimal": "error",
"no-implied-eval": "error",
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish_npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
node-version: 20
registry-url: 'https://registry.npmjs.org'

- name: Lint
run: npm i && npm run lint

- name: Publish
run: npm publish
env:
Expand Down
1 change: 0 additions & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const main = (module.exports = async (searchString, options, rt = 3) => {
saveCache(parsed, opts);
if (opts.type === 'playlist') {
const params = CACHE.get('playlistParams');
console.log(parsed.context);
parsed.json = await UTIL.doPost(
BASE_API_URL,
Object.assign({}, opts.requestOptions, {
Expand Down
5 changes: 5 additions & 0 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,12 @@ exports.logger = content => {

if (!FS.existsSync(dumpDir)) FS.mkdirSync(dumpDir);
FS.writeFileSync(file, JSON.stringify(content));
/* eslint-disable no-console */
console.error('*'.repeat(200));
console.error('Unsupported YouTube Search response.');
console.error(`Please post the the file "${file}" to ${bugsRef} or DisTube support server. Thanks!`);
console.error('*'.repeat(200));
/* eslint-enable no-console */
return null;
};

Expand All @@ -307,13 +309,16 @@ exports.checkForUpdates = async () => {
const buf = Buffer.from(data.content, data.encoding);
const pkgFile = JSON.parse(buf.toString('ascii'));
if (pkgFile.version !== pkg.version && updateWarnTimes++ < 5) {
// eslint-disable-next-line no-console
console.warn(
'\x1b[33mWARNING:\x1B[0m @distube/ytsr is out of date! Update with "npm install @distube/ytsr@latest".',
);
}
} catch (err) {
/* eslint-disable no-console */
console.warn('Error checking for updates:', err.message);
console.warn('You can disable this check by setting the `YTSR_NO_UPDATE` env variable.');
/* eslint-enable no-console */
}
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distube/ytsr",
"version": "2.0.3",
"version": "2.0.4",
"description": "A ytsr fork. Made for DisTube.js.org.",
"keywords": [
"youtube",
Expand Down

0 comments on commit 8e5a65c

Please sign in to comment.