@nx/js 22.6.0 → 22.7.0-beta.1

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.6.0",
3
+ "version": "22.7.0-beta.1",
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": {
@@ -39,8 +39,8 @@
39
39
  "@babel/preset-env": "^7.23.2",
40
40
  "@babel/preset-typescript": "^7.22.5",
41
41
  "@babel/runtime": "^7.22.6",
42
- "@nx/devkit": "22.6.0",
43
- "@nx/workspace": "22.6.0",
42
+ "@nx/devkit": "22.7.0-beta.1",
43
+ "@nx/workspace": "22.7.0-beta.1",
44
44
  "@zkochan/js-yaml": "0.0.7",
45
45
  "babel-plugin-const-enum": "^1.0.1",
46
46
  "babel-plugin-macros": "^3.1.0",
@@ -60,7 +60,7 @@
60
60
  "tslib": "^2.3.0"
61
61
  },
62
62
  "devDependencies": {
63
- "nx": "22.6.0"
63
+ "nx": "22.7.0-beta.1"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "verdaccio": "^6.0.5"
@@ -13,7 +13,7 @@ const cache_directory_1 = require("nx/src/utils/cache-directory");
13
13
  const util_1 = require("./util");
14
14
  let ts;
15
15
  const pmc = (0, devkit_1.getPackageManagerCommand)();
16
- const TSCONFIG_CACHE_VERSION = 1;
16
+ const TSCONFIG_CACHE_VERSION = 2;
17
17
  const TS_CONFIG_CACHE_PATH = (0, node_path_1.join)(cache_directory_1.workspaceDataDirectory, 'tsconfig-files.hash');
18
18
  // Module-level cache store — each invocation gets a unique Symbol key
19
19
  const cacheStore = new Map();
@@ -281,7 +281,7 @@ function buildTscTargets(config, options, context, configFiles, cache) {
281
281
  targets[targetName] = {
282
282
  dependsOn,
283
283
  command,
284
- options: { cwd: config.project.root },
284
+ options: { cwd: config.project.normalized },
285
285
  cache: true,
286
286
  inputs: getInputs(namedInputs, config, tsConfig, internalProjectReferences, context.workspaceRoot, cache),
287
287
  outputs: getOutputs(config, tsConfig, internalProjectReferences, context.workspaceRoot,
@@ -311,7 +311,7 @@ function buildTscTargets(config, options, context, configFiles, cache) {
311
311
  targets[targetName] = {
312
312
  dependsOn: [`^${targetName}`],
313
313
  command: `${compiler} --build ${options.build.configName}${options.verboseOutput ? ' --verbose' : ''}`,
314
- options: { cwd: config.project.root },
314
+ options: { cwd: config.project.normalized },
315
315
  cache: true,
316
316
  inputs: getInputs(namedInputs, config, tsConfig, internalProjectReferences, context.workspaceRoot, cache),
317
317
  outputs: getOutputs(config, tsConfig, internalProjectReferences, context.workspaceRoot,
@@ -889,12 +889,28 @@ function readFile(filePath, workspaceRoot, cache) {
889
889
  function toAbsolutePaths(cache, workspaceRoot) {
890
890
  const updatedCache = {};
891
891
  for (const [key, { data, extendedFilesHash, hash }] of Object.entries(cache)) {
892
+ const raw = {
893
+ nx: { addTypecheckTarget: data.raw?.['nx']?.addTypecheckTarget },
894
+ };
895
+ if (data.raw?.include) {
896
+ raw.include = data.raw.include;
897
+ }
898
+ if (data.raw?.exclude) {
899
+ raw.exclude = data.raw.exclude;
900
+ }
901
+ if (data.raw?.files) {
902
+ raw.files = data.raw.files;
903
+ }
892
904
  updatedCache[key] = {
893
905
  data: {
894
- options: { noEmit: data.options.noEmit },
895
- raw: {
896
- nx: { addTypecheckTarget: data.raw?.['nx']?.addTypecheckTarget },
906
+ options: {
907
+ noEmit: data.options.noEmit,
908
+ allowJs: data.options.allowJs,
909
+ resolveJsonModule: data.options.resolveJsonModule,
910
+ emitDeclarationOnly: data.options.emitDeclarationOnly,
911
+ declarationMap: data.options.declarationMap,
897
912
  },
913
+ raw,
898
914
  extendedConfigFiles: data.extendedConfigFiles,
899
915
  },
900
916
  extendedFilesHash,
@@ -926,12 +942,28 @@ function toAbsolutePaths(cache, workspaceRoot) {
926
942
  function toRelativePaths(cache, workspaceRoot) {
927
943
  const updatedCache = {};
928
944
  for (const [key, { data, extendedFilesHash, hash }] of Object.entries(cache)) {
945
+ const raw = {
946
+ nx: { addTypecheckTarget: data.raw?.['nx']?.addTypecheckTarget },
947
+ };
948
+ if (data.raw?.include) {
949
+ raw.include = data.raw.include;
950
+ }
951
+ if (data.raw?.exclude) {
952
+ raw.exclude = data.raw.exclude;
953
+ }
954
+ if (data.raw?.files) {
955
+ raw.files = data.raw.files;
956
+ }
929
957
  updatedCache[key] = {
930
958
  data: {
931
- options: { noEmit: data.options.noEmit },
932
- raw: {
933
- nx: { addTypecheckTarget: data.raw?.['nx']?.addTypecheckTarget },
959
+ options: {
960
+ noEmit: data.options.noEmit,
961
+ allowJs: data.options.allowJs,
962
+ resolveJsonModule: data.options.resolveJsonModule,
963
+ emitDeclarationOnly: data.options.emitDeclarationOnly,
964
+ declarationMap: data.options.declarationMap,
934
965
  },
966
+ raw,
935
967
  extendedConfigFiles: data.extendedConfigFiles,
936
968
  },
937
969
  extendedFilesHash,