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

[terminal] Fix a phantom dependency on "colors" #4527

Merged
merged 7 commits into from
Feb 20, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/heft/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"@rushstack/terminal": "workspace:*",
"@rushstack/ts-command-line": "workspace:*",
"@types/tapable": "1.0.6",
"chokidar": "~3.4.0",
"fast-glob": "~3.3.1",
"git-repo-info": "~2.1.0",
"ignore": "~5.1.6",
Expand Down
1 change: 0 additions & 1 deletion apps/lockfile-explorer-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"_phase:test": "heft run --only test -- --clean"
},
"dependencies": {
"@fluentui/react": "^8.96.1",
"react": "~17.0.2",
"react-dom": "~17.0.2",
"@lifaon/path": "~2.1.0",
Expand Down
183 changes: 91 additions & 92 deletions build-tests/install-test-workspace/workspace/common/pnpm-lock.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@microsoft/rush",
"comment": "Improve `rush scan` to analyze APIs such as `Import.lazy()` and `await import()`",
"type": "none"
}
],
"packageName": "@microsoft/rush"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/heft",
"comment": "Fix a recent regression causing `Error: Cannot find module 'colors/safe'` (GitHub #4525)",
"type": "patch"
}
],
"packageName": "@rushstack/heft"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/heft",
"comment": "Remove a no longer needed dependency on the `chokidar` package",
"type": "patch"
}
],
"packageName": "@rushstack/heft"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/node-core-library",
"comment": "Remove a no longer needed dependency on the `colors` package",
"type": "patch"
}
],
"packageName": "@rushstack/node-core-library"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/terminal",
"comment": "Fix a recent regression causing `Error: Cannot find module 'colors/safe'` (GitHub #4525)",
"type": "patch"
}
],
"packageName": "@rushstack/terminal"
}
15 changes: 3 additions & 12 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion libraries/node-core-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"_phase:test": "heft run --only test -- --clean"
},
"dependencies": {
"colors": "~1.2.1",
"fs-extra": "~7.0.1",
"import-lazy": "~4.0.0",
"jju": "~1.4.0",
Expand Down
24 changes: 16 additions & 8 deletions libraries/rush-lib/src/cli/actions/ScanAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,24 @@ export class ScanAction extends BaseConfiglessRushAction {

const requireRegExps: RegExp[] = [
// Example: require('something')
/\brequire\s*\(\s*[']([^']+\s*)[']\)/,
/\brequire\s*\(\s*["]([^"]+)["]\s*\)/,
/\brequire\s*\(\s*[']([^']+\s*)[']\s*\)/,
/\brequire\s*\(\s*["]([^"]+\s*)["]\s*\)/,

// Example: require.ensure('something')
/\brequire.ensure\s*\(\s*[']([^']+\s*)[']\)/,
/\brequire.ensure\s*\(\s*["]([^"]+)["]\s*\)/,
/\brequire\.ensure\s*\(\s*[']([^']+\s*)[']\s*\)/,
/\brequire\.ensure\s*\(\s*["]([^"]+\s*)["]\s*\)/,

// Example: require.resolve('something')
/\brequire.resolve\s*\(\s*[']([^']+\s*)[']\)/,
/\brequire.resolve\s*\(\s*["]([^"]+)["]\s*\)/,
/\brequire\.resolve\s*\(\s*[']([^']+\s*)[']\s*\)/,
/\brequire\.resolve\s*\(\s*["]([^"]+\s*)["]\s*\)/,

// Example: System.import('something')
/\bSystem.import\s*\(\s*[']([^']+\s*)[']\)/,
/\bSystem.import\s*\(\s*["]([^"]+)["]\s*\)/,
/\bSystem\.import\s*\(\s*[']([^']+\s*)[']\s*\)/,
/\bSystem\.import\s*\(\s*["]([^"]+\s*)["]\s*\)/,

// Example: Import.lazy('something', require);
/\bImport\.lazy\s*\(\s*[']([^']+\s*)[']/,
/\bImport\.lazy\s*\(\s*["]([^"]+\s*)["]/,

// Example:
//
Expand All @@ -94,6 +98,10 @@ export class ScanAction extends BaseConfiglessRushAction {
/\bimport\s*[']([^']+)[']\s*\;/,
/\bimport\s*["]([^"]+)["]\s*\;/,

// Example: await import('fast-glob')
/\bimport\s*\(\s*[']([^']+)[']\s*\)/,
/\bimport\s*\(\s*["]([^"]+)["]\s*\)/,

// Example:
// /// <reference types="something" />
/\/\/\/\s*<\s*reference\s+types\s*=\s*["]([^"]+)["]\s*\/>/
Expand Down
6 changes: 3 additions & 3 deletions libraries/terminal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
"_phase:test": "heft run --only test -- --clean"
},
"dependencies": {
"@rushstack/node-core-library": "workspace:*"
"@rushstack/node-core-library": "workspace:*",
"colors": "~1.2.1"
},
"devDependencies": {
"@rushstack/heft": "0.64.0",
"@rushstack/heft-node-rig": "2.4.0",
"@types/heft-jest": "1.0.1",
"@types/node": "18.17.15",
"local-eslint-config": "workspace:*",
"colors": "~1.2.1"
"local-eslint-config": "workspace:*"
},
"peerDependencies": {
"@types/node": "*"
Expand Down
Loading