@nx/js 22.7.0-beta.7 → 22.7.0-beta.8
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/js",
|
|
3
|
-
"version": "22.7.0-beta.
|
|
3
|
+
"version": "22.7.0-beta.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The JS plugin for Nx contains executors and generators that provide the best experience for developing JavaScript and TypeScript projects. ",
|
|
6
6
|
"repository": {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"@babel/preset-env": "^7.23.2",
|
|
41
41
|
"@babel/preset-typescript": "^7.22.5",
|
|
42
42
|
"@babel/runtime": "^7.22.6",
|
|
43
|
-
"@nx/devkit": "22.7.0-beta.
|
|
44
|
-
"@nx/workspace": "22.7.0-beta.
|
|
43
|
+
"@nx/devkit": "22.7.0-beta.8",
|
|
44
|
+
"@nx/workspace": "22.7.0-beta.8",
|
|
45
45
|
"@zkochan/js-yaml": "0.0.7",
|
|
46
46
|
"babel-plugin-const-enum": "^1.0.1",
|
|
47
47
|
"babel-plugin-macros": "^3.1.0",
|
|
@@ -54,14 +54,14 @@
|
|
|
54
54
|
"jsonc-parser": "3.2.0",
|
|
55
55
|
"npm-run-path": "^4.0.1",
|
|
56
56
|
"picocolors": "^1.1.0",
|
|
57
|
-
"picomatch": "4.0.
|
|
57
|
+
"picomatch": "4.0.4",
|
|
58
58
|
"semver": "^7.6.3",
|
|
59
59
|
"source-map-support": "0.5.19",
|
|
60
60
|
"tinyglobby": "^0.2.12",
|
|
61
61
|
"tslib": "^2.3.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"nx": "22.7.0-beta.
|
|
64
|
+
"nx": "22.7.0-beta.8"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"verdaccio": "^6.0.5"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../../packages/js/src/plugins/typescript/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,kBAAkB,EAEvB,KAAK,aAAa,EAInB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../../packages/js/src/plugins/typescript/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,kBAAkB,EAEvB,KAAK,aAAa,EAInB,MAAM,YAAY,CAAC;AA8BpB,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC1B,SAAS,CAAC,EACN,OAAO,GACP;QACE,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACN,KAAK,CAAC,EACF,OAAO,GACP;QACE,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;IACN,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA2KD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAEhC,CAAC;AAEF,eAAO,MAAM,WAAW,sBAAsB,CAAC;AAI/C,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,gBAAgB,CA0FzD,CAAC;AAEF,eAAO,MAAM,WAAW,iCAAgB,CAAC"}
|
|
@@ -496,10 +496,6 @@ function getOutputs(config, rootTsConfig, internalProjectReferences, workspaceRo
|
|
|
496
496
|
outputs.add(pathToInputOrOutput((0, devkit_1.joinPathFragments)(outDir, `${outFileName}.js.map`), workspaceRoot, config.project));
|
|
497
497
|
outputs.add(pathToInputOrOutput((0, devkit_1.joinPathFragments)(outDir, `${outFileName}.d.ts`), workspaceRoot, config.project));
|
|
498
498
|
outputs.add(pathToInputOrOutput((0, devkit_1.joinPathFragments)(outDir, `${outFileName}.d.ts.map`), workspaceRoot, config.project));
|
|
499
|
-
// https://www.typescriptlang.org/tsconfig#tsBuildInfoFile
|
|
500
|
-
outputs.add(tsConfig.options.tsBuildInfoFile
|
|
501
|
-
? pathToInputOrOutput(tsConfig.options.tsBuildInfoFile, workspaceRoot, config.project)
|
|
502
|
-
: pathToInputOrOutput((0, devkit_1.joinPathFragments)(outDir, `${outFileName}.tsbuildinfo`), workspaceRoot, config.project));
|
|
503
499
|
}
|
|
504
500
|
else if (tsConfig.options.outDir) {
|
|
505
501
|
if (emitDeclarationOnly) {
|
|
@@ -516,22 +512,6 @@ function getOutputs(config, rootTsConfig, internalProjectReferences, workspaceRo
|
|
|
516
512
|
const jsonExt = tsConfig.options.resolveJsonModule ? ',json' : '';
|
|
517
513
|
outputs.add(pathToInputOrOutput((0, devkit_1.joinPathFragments)(tsConfig.options.outDir, `**/*.{js,cjs,mjs,jsx${jsonExt},d.ts,d.cts,d.mts}{,.map}`), workspaceRoot, config.project));
|
|
518
514
|
}
|
|
519
|
-
if (tsConfig.options.tsBuildInfoFile) {
|
|
520
|
-
if (emitDeclarationOnly ||
|
|
521
|
-
!(0, node_path_1.normalize)(tsConfig.options.tsBuildInfoFile).startsWith(`${(0, node_path_1.normalize)(tsConfig.options.outDir)}${node_path_1.sep}`)) {
|
|
522
|
-
// https://www.typescriptlang.org/tsconfig#tsBuildInfoFile
|
|
523
|
-
outputs.add(pathToInputOrOutput(tsConfig.options.tsBuildInfoFile, workspaceRoot, config.project));
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
else if (tsConfig.options.rootDir && tsConfig.options.rootDir !== '.') {
|
|
527
|
-
// If rootDir is set, then the tsbuildinfo file will be outside the outDir so we need to add it.
|
|
528
|
-
const relativeRootDir = (0, node_path_1.relative)(tsConfig.options.rootDir, (0, node_path_1.join)(workspaceRoot, config.project.root));
|
|
529
|
-
outputs.add(pathToInputOrOutput((0, devkit_1.joinPathFragments)(tsConfig.options.outDir, relativeRootDir, `*.tsbuildinfo`), workspaceRoot, config.project));
|
|
530
|
-
}
|
|
531
|
-
else if (emitDeclarationOnly) {
|
|
532
|
-
// https://www.typescriptlang.org/tsconfig#tsBuildInfoFile
|
|
533
|
-
outputs.add(pathToInputOrOutput((0, devkit_1.joinPathFragments)(tsConfig.options.outDir, `${configBaseNameNoExt}.tsbuildinfo`), workspaceRoot, config.project));
|
|
534
|
-
}
|
|
535
515
|
}
|
|
536
516
|
else if (tsConfig.raw?.include?.length ||
|
|
537
517
|
tsConfig.raw?.files?.length ||
|
|
@@ -549,14 +529,30 @@ function getOutputs(config, rootTsConfig, internalProjectReferences, workspaceRo
|
|
|
549
529
|
outputs.add((0, devkit_1.joinPathFragments)('{projectRoot}', '**/*.d.ts.map'));
|
|
550
530
|
outputs.add((0, devkit_1.joinPathFragments)('{projectRoot}', '**/*.d.cts.map'));
|
|
551
531
|
outputs.add((0, devkit_1.joinPathFragments)('{projectRoot}', '**/*.d.mts.map'));
|
|
552
|
-
// https://www.typescriptlang.org/tsconfig#tsBuildInfoFile
|
|
553
|
-
outputs.add(tsConfig.options.tsBuildInfoFile
|
|
554
|
-
? pathToInputOrOutput(tsConfig.options.tsBuildInfoFile, workspaceRoot, config.project)
|
|
555
|
-
: (0, devkit_1.joinPathFragments)('{projectRoot}', `${configBaseNameNoExt}.tsbuildinfo`));
|
|
556
532
|
}
|
|
533
|
+
// tsc --build always produces a tsbuildinfo file.
|
|
534
|
+
outputs.add(getTsBuildInfoOutputPath(tsConfig, configBaseNameNoExt, workspaceRoot, config.project));
|
|
557
535
|
});
|
|
558
536
|
return Array.from(outputs);
|
|
559
537
|
}
|
|
538
|
+
/**
|
|
539
|
+
* Returns the path to the tsbuildinfo file that tsc --build will produce.
|
|
540
|
+
* tsc always emits this file in build mode (incremental is implicit).
|
|
541
|
+
*/
|
|
542
|
+
function getTsBuildInfoOutputPath(tsConfig, configBaseNameNoExt, workspaceRoot, project) {
|
|
543
|
+
if (tsConfig.options.tsBuildInfoFile) {
|
|
544
|
+
return pathToInputOrOutput(tsConfig.options.tsBuildInfoFile, workspaceRoot, project);
|
|
545
|
+
}
|
|
546
|
+
if (tsConfig.options.outFile) {
|
|
547
|
+
const outFileName = (0, node_path_1.basename)(tsConfig.options.outFile, '.js');
|
|
548
|
+
const outDir = (0, node_path_1.relative)(workspaceRoot, (0, node_path_1.dirname)(tsConfig.options.outFile));
|
|
549
|
+
return pathToInputOrOutput((0, devkit_1.joinPathFragments)(outDir, `${outFileName}.tsbuildinfo`), workspaceRoot, project);
|
|
550
|
+
}
|
|
551
|
+
if (tsConfig.options.outDir) {
|
|
552
|
+
return pathToInputOrOutput((0, devkit_1.joinPathFragments)(tsConfig.options.outDir, `${configBaseNameNoExt}.tsbuildinfo`), workspaceRoot, project);
|
|
553
|
+
}
|
|
554
|
+
return (0, devkit_1.joinPathFragments)('{projectRoot}', `${configBaseNameNoExt}.tsbuildinfo`);
|
|
555
|
+
}
|
|
560
556
|
function pathToInputOrOutput(path, workspaceRoot, project) {
|
|
561
557
|
const fullProjectRoot = project.absolute;
|
|
562
558
|
const fullPath = (0, node_path_1.resolve)(workspaceRoot, path);
|