@nx/js 23.2.0-beta.10 → 23.2.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
<div style="text-align: center;">
|
|
9
9
|
|
|
10
|
-
[]()
|
|
10
|
+
[](<>)
|
|
11
11
|
[](https://www.npmjs.com/package/nx)
|
|
12
|
-
[]()
|
|
12
|
+
[](<>)
|
|
13
13
|
[](http://commitizen.github.io/cz-cli/)
|
|
14
14
|
[](https://go.nx.dev/community)
|
|
15
15
|
[](https://nx.dev/docs/features/ci-features/sandboxing)
|
|
@@ -154,7 +154,7 @@ function compileTSWithWatch(context, logger, hooks, reporters) {
|
|
|
154
154
|
project.kind !== ts.InvalidatedProjectKind.UpdateOutputFileStamps) {
|
|
155
155
|
logger.warn(`The project ${projectName} ` +
|
|
156
156
|
`is using the deprecated "prepend" Typescript compiler option. ` +
|
|
157
|
-
`This option is not supported by the batch executor and it's ignored
|
|
157
|
+
`This option is not supported by the batch executor and it's ignored.`, project.project);
|
|
158
158
|
continue;
|
|
159
159
|
}
|
|
160
160
|
hooks?.beforeProjectCompilationCallback(project.project);
|
|
@@ -41,8 +41,7 @@ export interface LibraryGeneratorSchema {
|
|
|
41
41
|
passWithNoTests?: boolean;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
export interface NormalizedLibraryGeneratorOptions
|
|
45
|
-
extends LibraryGeneratorSchema {
|
|
44
|
+
export interface NormalizedLibraryGeneratorOptions extends LibraryGeneratorSchema {
|
|
46
45
|
name: string;
|
|
47
46
|
/** `normalizeOptions` always resolves this, so it is no longer optional. */
|
|
48
47
|
linter: LinterType;
|
|
@@ -60,7 +60,24 @@ async function updateLockFile(cwd, { dryRun, verbose, options, }) {
|
|
|
60
60
|
if (dryRun) {
|
|
61
61
|
return [];
|
|
62
62
|
}
|
|
63
|
+
// Capture modified/untracked files before the lock file update so we can
|
|
64
|
+
// detect everything the package-manager command touches on disk.
|
|
65
|
+
const modifiedBefore = getGitModifiedFiles(cwd);
|
|
63
66
|
execLockFileUpdate(command, cwd, env);
|
|
67
|
+
// Capture again after the command to compute the delta.
|
|
68
|
+
const modifiedAfter = getGitModifiedFiles(cwd);
|
|
69
|
+
const newlyChanged = [...modifiedAfter].filter((f) => !modifiedBefore.has(f));
|
|
70
|
+
// Always include the lock file itself even if git didn't pick it up
|
|
71
|
+
// (e.g. it could be .gitignored in unusual setups).
|
|
72
|
+
if (!newlyChanged.includes(lockFile)) {
|
|
73
|
+
newlyChanged.push(lockFile);
|
|
74
|
+
}
|
|
75
|
+
if (verbose && newlyChanged.length > 1) {
|
|
76
|
+
console.log(`\nDetected additional files changed during lock file update:`);
|
|
77
|
+
newlyChanged
|
|
78
|
+
.filter((f) => f !== lockFile)
|
|
79
|
+
.forEach((f) => console.log(` ${f}`));
|
|
80
|
+
}
|
|
64
81
|
if (isDaemonEnabled) {
|
|
65
82
|
try {
|
|
66
83
|
await internal_1.daemonClient.startInBackground();
|
|
@@ -75,7 +92,31 @@ async function updateLockFile(cwd, { dryRun, verbose, options, }) {
|
|
|
75
92
|
}
|
|
76
93
|
}
|
|
77
94
|
}
|
|
78
|
-
return
|
|
95
|
+
return newlyChanged;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Returns the set of modified, added, and untracked file paths reported by git.
|
|
99
|
+
* Used to detect all filesystem side-effects of the lock file update command.
|
|
100
|
+
*/
|
|
101
|
+
function getGitModifiedFiles(cwd) {
|
|
102
|
+
try {
|
|
103
|
+
// Do not trim the result: porcelain lines for working-tree-only changes
|
|
104
|
+
// start with a leading space (e.g. " M path"), and stripping it would
|
|
105
|
+
// make substring(3) drop the first character of the path on the first line.
|
|
106
|
+
const result = (0, child_process_1.execSync)('git status --porcelain', {
|
|
107
|
+
cwd,
|
|
108
|
+
encoding: 'utf-8',
|
|
109
|
+
windowsHide: true,
|
|
110
|
+
});
|
|
111
|
+
return new Set(result
|
|
112
|
+
.split('\n')
|
|
113
|
+
.filter((l) => l.length >= 4)
|
|
114
|
+
.map((l) => l.substring(3)));
|
|
115
|
+
}
|
|
116
|
+
catch {
|
|
117
|
+
// git may not be available or this may not be a git repo
|
|
118
|
+
return new Set();
|
|
119
|
+
}
|
|
79
120
|
}
|
|
80
121
|
function execLockFileUpdate(command, cwd, env) {
|
|
81
122
|
try {
|
|
@@ -47,8 +47,7 @@ export interface SwcCliOptions {
|
|
|
47
47
|
stripLeadingPaths: boolean;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
export interface NormalizedSwcExecutorOptions
|
|
51
|
-
extends NormalizedExecutorOptions {
|
|
50
|
+
export interface NormalizedSwcExecutorOptions extends NormalizedExecutorOptions {
|
|
52
51
|
originalProjectRoot: string;
|
|
53
52
|
swcExclude: string[];
|
|
54
53
|
skipTypeCheck: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/js",
|
|
3
|
-
"version": "23.2.0-beta.
|
|
3
|
+
"version": "23.2.0-beta.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
@@ -147,18 +147,18 @@
|
|
|
147
147
|
"source-map-support": "0.5.19",
|
|
148
148
|
"tinyglobby": "^0.2.12",
|
|
149
149
|
"tslib": "^2.3.0",
|
|
150
|
-
"@nx/devkit": "23.2.0-beta.
|
|
151
|
-
"@nx/workspace": "23.2.0-beta.
|
|
150
|
+
"@nx/devkit": "23.2.0-beta.11",
|
|
151
|
+
"@nx/workspace": "23.2.0-beta.11"
|
|
152
152
|
},
|
|
153
153
|
"devDependencies": {
|
|
154
|
-
"@nx/esbuild": "23.2.0-beta.
|
|
155
|
-
"@nx/eslint": "23.2.0-beta.
|
|
156
|
-
"@nx/jest": "23.2.0-beta.
|
|
157
|
-
"@nx/oxlint": "23.2.0-beta.
|
|
158
|
-
"@nx/rollup": "23.2.0-beta.
|
|
159
|
-
"@nx/vite": "23.2.0-beta.
|
|
160
|
-
"@nx/vitest": "23.2.0-beta.
|
|
161
|
-
"nx": "23.2.0-beta.
|
|
154
|
+
"@nx/esbuild": "23.2.0-beta.11",
|
|
155
|
+
"@nx/eslint": "23.2.0-beta.11",
|
|
156
|
+
"@nx/jest": "23.2.0-beta.11",
|
|
157
|
+
"@nx/oxlint": "23.2.0-beta.11",
|
|
158
|
+
"@nx/rollup": "23.2.0-beta.11",
|
|
159
|
+
"@nx/vite": "23.2.0-beta.11",
|
|
160
|
+
"@nx/vitest": "23.2.0-beta.11",
|
|
161
|
+
"nx": "23.2.0-beta.11"
|
|
162
162
|
},
|
|
163
163
|
"peerDependencies": {
|
|
164
164
|
"@swc/cli": ">=0.6.0 <0.9.0",
|