Skip to content

Commit

Permalink
chore: update deps and dev deps
Browse files Browse the repository at this point in the history
- Update the dependencies and developer dependencies to their latest
versions.
- Remove deprecated `eslint-plugin-standard` developer dependency as
it's no longer needed.
  • Loading branch information
VoltrexKeyva committed Feb 26, 2023
1 parent 01d10df commit 596d310
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 33 deletions.
3 changes: 2 additions & 1 deletion lib/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ async function tryCreateGitHubToken(githubAuth) {
credentials = await githubAuth({
noSave: true,
scopes: ['user:email', 'read:org'],
note: 'node-core-utils CLI tools'
note: 'node-core-utils CLI tools',
noDeviceFlow: true
});
} catch (e) {
errorExit(`Could not get token: ${e.message}`);
Expand Down
8 changes: 4 additions & 4 deletions lib/session.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'node:path';
import fs from 'node:fs';

import rimraf from 'rimraf';
import { rimrafSync } from 'rimraf';

import { getMergedConfig, getNcuDir } from './config.js';
import { readJson, writeJson, readFile, writeFile } from './file.js';
Expand Down Expand Up @@ -148,13 +148,13 @@ export default class Session {
try {
sess = this.session;
} catch (err) {
return rimraf.sync(this.sessionPath);
return rimrafSync(this.sessionPath);
}

if (sess.prid && sess.prid === this.prid) {
rimraf.sync(this.pullDir);
rimrafSync(this.pullDir);
}
rimraf.sync(this.sessionPath);
rimrafSync(this.sessionPath);
}

get statusPath() {
Expand Down
41 changes: 20 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,38 +34,37 @@
],
"license": "MIT",
"dependencies": {
"branch-diff": "^1.10.5",
"chalk": "^5.0.1",
"changelog-maker": "^2.8.0",
"branch-diff": "^2.1.0",
"chalk": "^5.2.0",
"changelog-maker": "^3.2.1",
"cheerio": "^1.0.0-rc.10",
"clipboardy": "^3.0.0",
"core-validate-commit": "^3.16.0",
"core-validate-commit": "^3.18.0",
"enquirer": "^2.3.6",
"execa": "^6.1.0",
"figures": "^4.0.1",
"execa": "^7.0.0",
"figures": "^5.0.0",
"form-data": "^4.0.0",
"ghauth": "^4.0.0",
"inquirer": "^8.2.4",
"listr2": "^4.0.5",
"ghauth": "^5.0.1",
"inquirer": "^9.1.4",
"listr2": "^5.0.7",
"lodash": "^4.17.21",
"log-symbols": "^5.1.0",
"ora": "^6.1.0",
"ora": "^6.1.2",
"proxy-agent": "^5.0.0",
"replace-in-file": "^6.3.2",
"rimraf": "^3.0.2",
"replace-in-file": "^6.3.5",
"rimraf": "^4.1.2",
"undici": "^5.20.0",
"which": "^2.0.2",
"yargs": "^17.5.0"
"which": "^3.0.0",
"yargs": "^17.7.1"
},
"devDependencies": {
"c8": "^7.11.2",
"eslint": "^8.15.0",
"c8": "^7.13.0",
"eslint": "^8.35.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-standard": "^4.1.0",
"mocha": "^10.0.0",
"sinon": "^14.0.0"
"eslint-plugin-promise": "^6.1.1",
"mocha": "^10.2.0",
"sinon": "^15.0.1"
}
}
4 changes: 2 additions & 2 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import path from 'node:path';
import fs from 'node:fs';
import { fileURLToPath } from 'node:url';

import rimraf from 'rimraf';
import { rimrafSync } from 'rimraf';

const tmpdirPath = fileURLToPath(new URL('tmp', import.meta.url));

Expand All @@ -11,7 +11,7 @@ export const tmpdir = {
return tmpdirPath;
},
refresh() {
rimraf.sync(this.path);
rimrafSync(this.path);
fs.mkdirSync(this.path, { recursive: true });
}
};
Expand Down
3 changes: 2 additions & 1 deletion test/fixtures/run-auth-github.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ async function mockCredentials(options) {
assert.deepStrictEqual(options, {
noSave: true,
scopes: ['user:email', 'read:org'],
note: 'node-core-utils CLI tools'
note: 'node-core-utils CLI tools',
noDeviceFlow: true
});
return {
user: 'nyancat',
Expand Down
8 changes: 4 additions & 4 deletions test/unit/auth.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import assert from 'node:assert';

import rimraf from 'rimraf';
import { rimrafSync } from 'rimraf';

let testCounter = 0; // for tmp directories

Expand Down Expand Up @@ -136,7 +136,7 @@ function runAuthScript(
if (ncurc[envVar] === undefined) continue;
newEnv[envVar] =
fileURLToPath(new URL(`tmp-${testCounter++}`, import.meta.url));
rimraf.sync(newEnv[envVar]);
rimrafSync(newEnv[envVar]);
fs.mkdirSync(newEnv[envVar], { recursive: true });

const ncurcPath = path.resolve(newEnv[envVar],
Expand Down Expand Up @@ -169,8 +169,8 @@ function runAuthScript(
try {
assert.strictEqual(stderr, error);
assert.strictEqual(expect.length, 0);
if (newEnv.HOME) rimraf.sync(newEnv.HOME);
if (newEnv.XDG_CONFIG_HOME) rimraf.sync(newEnv.XDG_CONFIG_HOME);
if (newEnv.HOME) rimrafSync(newEnv.HOME);
if (newEnv.XDG_CONFIG_HOME) rimrafSync(newEnv.XDG_CONFIG_HOME);
} catch (err) {
reject(err);
}
Expand Down

0 comments on commit 596d310

Please sign in to comment.