Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): update yargs to ^17.6.2 #12978

Merged
merged 4 commits into from Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -246,8 +246,8 @@
"webpack-sources": "^3.2.3",
"webpack-subresource-integrity": "^5.1.0",
"xstate": "^4.25.0",
"yargs": "^17.4.0",
"yargs-parser": "21.0.1"
"yargs": "^17.6.2",
"yargs-parser": "21.1.1"
},
"author": "Victor Savkin",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/add-nx-to-monorepo/package.json
Expand Up @@ -33,7 +33,7 @@
"enquirer": "~2.3.6",
"ignore": "^5.0.4",
"nx": "file:../nx",
"yargs-parser": "21.0.1"
"yargs-parser": "21.1.1"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/cra-to-nx/package.json
Expand Up @@ -28,7 +28,7 @@
"fs-extra": "^10.1.0",
"nx": "file:../nx",
"tslib": "^2.3.0",
"yargs-parser": "21.0.1"
"yargs-parser": "21.1.1"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/create-nx-plugin/package.json
Expand Up @@ -34,7 +34,7 @@
"fs-extra": "^10.1.0",
"nx": "file:../nx",
"tmp": "~0.2.1",
"yargs-parser": "21.0.1"
"yargs-parser": "21.1.1"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/create-nx-workspace/package.json
Expand Up @@ -35,7 +35,7 @@
"ora": "5.3.0",
"tmp": "~0.2.1",
"tslib": "^2.3.0",
"yargs": "^17.4.0",
"yargs": "^17.6.2",
"axios": "^1.0.0"
},
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/make-angular-cli-faster/package.json
Expand Up @@ -34,8 +34,8 @@
"nx": "file:../nx",
"semver": "7.3.4",
"tmp": "~0.2.1",
"yargs": "^17.4.0",
"yargs-parser": "21.0.1"
"yargs": "^17.6.2",
"yargs-parser": "21.1.1"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/nx/package.json
Expand Up @@ -61,8 +61,8 @@
"tsconfig-paths": "^3.9.0",
"tslib": "^2.3.0",
"v8-compile-cache": "2.3.0",
"yargs": "^17.4.0",
"yargs-parser": "21.0.1",
"yargs": "^17.6.2",
"yargs-parser": "21.1.1",
"js-yaml": "4.1.0",
"axios": "^1.0.0"
},
Expand Down
25 changes: 25 additions & 0 deletions packages/nx/src/utils/lock-file/lock-file.spec.ts
Expand Up @@ -18,8 +18,33 @@ import {
lockFileDevkitAndYargs as yarnLockFileDevkitAndYargs,
lockFile as yarnLockFile,
} from './__fixtures__/yarn.lock';
import { vol } from 'memfs';

jest.mock('fs', () => require('memfs').fs);

jest.mock('@nrwl/devkit', () => ({
...jest.requireActual<any>('@nrwl/devkit'),
workspaceRoot: '/root',
}));

jest.mock('nx/src/utils/workspace-root', () => ({
workspaceRoot: '/root',
}));

describe('lock-file', () => {
const fileSys = {
'node_modules/chalk/package.json': '{"version": "4.1.0"}',
'node_modules/glob/package.json': '{"version": "7.1.4"}',
'node_modules/js-yaml/package.json': '{"version": "4.1.0"}',
'node_modules/minimatch/package.json': '{"version": "3.0.5"}',
'node_modules/semver/package.json': '{"version": "7.3.4"}',
'node_modules/tslib/package.json': '{"version": "2.4.0"}',
'node_modules/yargs-parser/package.json': '{"version": "21.0.1"}',
};
beforeEach(() => {
vol.fromJSON(fileSys, '/root');
});

describe('mapLockFileDataToExternalNodes', () => {
describe('yarn', () => {
it('should map lock file data to external nodes', () => {
Expand Down
1 change: 1 addition & 0 deletions packages/nx/src/utils/lock-file/yarn.ts
Expand Up @@ -80,6 +80,7 @@ function mapPackages(
const rootVersionKey = versionKeys.find((v) =>
isRootVersion(packageName, versions[v].version)
);

// this should never happen, but just in case
if (rootVersionKey) {
versions[rootVersionKey].rootVersion = true;
Expand Down
4 changes: 2 additions & 2 deletions packages/workspace/package.json
Expand Up @@ -89,8 +89,8 @@
"semver": "7.3.4",
"tmp": "~0.2.1",
"tslib": "^2.3.0",
"yargs": "^17.4.0",
"yargs-parser": "21.0.1"
"yargs": "^17.6.2",
"yargs-parser": "21.1.1"
},
"publishConfig": {
"access": "public"
Expand Down
15 changes: 14 additions & 1 deletion yarn.lock
Expand Up @@ -23250,7 +23250,7 @@ yargs-parser@21.0.1:
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35"
integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==

yargs-parser@>=21.0.1, yargs-parser@^21.0.0, yargs-parser@^21.0.1:
yargs-parser@21.1.1, yargs-parser@>=21.0.1, yargs-parser@^21.0.0, yargs-parser@^21.0.1, yargs-parser@^21.1.1:
version "21.1.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
Expand Down Expand Up @@ -23299,6 +23299,19 @@ yargs@^17.2.1, yargs@^17.3.1, yargs@^17.4.0:
y18n "^5.0.5"
yargs-parser "^21.0.0"

yargs@^17.6.2:
version "17.6.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.6.2.tgz#2e23f2944e976339a1ee00f18c77fedee8332541"
integrity sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==
dependencies:
cliui "^8.0.1"
escalade "^3.1.1"
get-caller-file "^2.0.5"
require-directory "^2.1.1"
string-width "^4.2.3"
y18n "^5.0.5"
yargs-parser "^21.1.1"

yauzl@^2.10.0:
version "2.10.0"
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"
Expand Down