@nx/js 22.6.0-pr.34722.ef1fe91 → 22.6.0-pr.34728.66566c0

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-pr.34722.ef1fe91",
3
+ "version": "22.6.0-pr.34728.66566c0",
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-pr.34722.ef1fe91",
43
- "@nx/workspace": "22.6.0-pr.34722.ef1fe91",
42
+ "@nx/devkit": "22.6.0-pr.34728.66566c0",
43
+ "@nx/workspace": "22.6.0-pr.34728.66566c0",
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-pr.34722.ef1fe91"
63
+ "nx": "22.6.0-pr.34728.66566c0"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "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;AAgCpB,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC1B,SAAS,CAAC,EACN,OAAO,GACP;QACE,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;AA0KD;;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"}
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;AA+BpB,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC1B,SAAS,CAAC,EACN,OAAO,GACP;QACE,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;AA0KD;;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"}
@@ -5,7 +5,6 @@ const devkit_1 = require("@nx/devkit");
5
5
  const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
6
6
  const node_fs_1 = require("node:fs");
7
7
  const node_path_1 = require("node:path");
8
- const posix = require("node:path/posix");
9
8
  const file_hasher_1 = require("nx/src/hasher/file-hasher");
10
9
  const picomatch = require("picomatch");
11
10
  // eslint-disable-next-line @typescript-eslint/no-restricted-imports
@@ -67,7 +66,7 @@ function createConfigContext(configFilePath, workspaceRoot, projectContext) {
67
66
  return {
68
67
  originalPath: configFilePath,
69
68
  absolutePath,
70
- relativePath: posix.relative(workspaceRoot, absolutePath),
69
+ relativePath: posixRelative(workspaceRoot, absolutePath),
71
70
  basename: (0, node_path_1.basename)(configFilePath),
72
71
  basenameNoExt: (0, node_path_1.basename)(configFilePath, '.json'),
73
72
  dirname: (0, node_path_1.dirname)(absolutePath),
@@ -87,7 +86,7 @@ function getConfigContext(configPath, workspaceRoot, cache) {
87
86
  if (!cache.projectContexts.has(projectRoot)) {
88
87
  cache.projectContexts.set(projectRoot, {
89
88
  root: projectRoot,
90
- normalized: posix.normalize(projectRoot),
89
+ normalized: (0, devkit_1.normalizePath)(projectRoot),
91
90
  absolute: (0, node_path_1.join)(workspaceRoot, projectRoot),
92
91
  });
93
92
  }
@@ -747,6 +746,11 @@ function readTsConfig(tsConfigPath, workspaceRoot, cache) {
747
746
  if (!ts) {
748
747
  ts = require('typescript');
749
748
  }
749
+ // Normalize to forward slashes for TypeScript compatibility on Windows.
750
+ // TypeScript's parser normalizes paths inconsistently — diagnostics use
751
+ // normalized paths but the source file retains the original, causing
752
+ // assertion failures when backslashes are present.
753
+ tsConfigPath = tsConfigPath.replaceAll('\\', '/');
750
754
  const tsSys = {
751
755
  ...ts.sys,
752
756
  readFile: (path) => readFile(path, workspaceRoot, cache),
@@ -915,5 +919,5 @@ function toRelativePaths(cache, workspaceRoot) {
915
919
  return updatedCache;
916
920
  }
917
921
  function posixRelative(workspaceRoot, path) {
918
- return posix.normalize((0, node_path_1.relative)(workspaceRoot, path));
922
+ return (0, devkit_1.normalizePath)((0, node_path_1.relative)(workspaceRoot, path));
919
923
  }