@nx/js 23.2.0 → 23.2.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.
@@ -20,9 +20,18 @@ function readTsConfig(tsConfigPath, sys) {
20
20
  if (!tsModule) {
21
21
  tsModule = require('typescript');
22
22
  }
23
+ // A tree-backed `sys` (readTsConfigFromTree) reads via `FsTree.read`, which
24
+ // re-roots an absolute path and breaks, so only absolutize the default sys.
25
+ const usingDefaultSys = !sys || sys === tsModule.sys;
23
26
  sys ??= tsModule.sys;
24
- const readResult = tsModule.readConfigFile(tsConfigPath, sys.readFile);
25
- return tsModule.parseJsonConfigFileContent(readResult.config, sys, (0, path_1.dirname)(tsConfigPath));
27
+ // Resolve to absolute so `${configDir}` in `paths` expands to absolute
28
+ // values. A relative basePath produces the TS5090 "no baseUrl" error.
29
+ //
30
+ // Don't also pass `configPath` as `configFileName` (5th arg). It doesn't
31
+ // affect `${configDir}`, only shifts emit output paths (dist/src vs dist).
32
+ const configPath = usingDefaultSys ? (0, path_1.resolve)(tsConfigPath) : tsConfigPath;
33
+ const readResult = tsModule.readConfigFile(configPath, sys.readFile);
34
+ return tsModule.parseJsonConfigFileContent(readResult.config, sys, (0, path_1.dirname)(configPath));
26
35
  }
27
36
  function readTsConfigFromTree(tree, tsConfigPath) {
28
37
  if (!tsModule) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/js",
3
- "version": "23.2.0",
3
+ "version": "23.2.1",
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/workspace": "23.2.0",
151
- "@nx/devkit": "23.2.0"
150
+ "@nx/devkit": "23.2.1",
151
+ "@nx/workspace": "23.2.1"
152
152
  },
153
153
  "devDependencies": {
154
- "@nx/esbuild": "23.2.0",
155
- "@nx/eslint": "23.2.0",
156
- "@nx/jest": "23.2.0",
157
- "@nx/vitest": "23.2.0",
158
- "@nx/rollup": "23.2.0",
159
- "@nx/vite": "23.2.0",
160
- "@nx/oxlint": "23.2.0",
161
- "nx": "23.2.0"
154
+ "@nx/eslint": "23.2.1",
155
+ "@nx/esbuild": "23.2.1",
156
+ "@nx/jest": "23.2.1",
157
+ "@nx/oxlint": "23.2.1",
158
+ "@nx/rollup": "23.2.1",
159
+ "@nx/vite": "23.2.1",
160
+ "@nx/vitest": "23.2.1",
161
+ "nx": "23.2.1"
162
162
  },
163
163
  "peerDependencies": {
164
164
  "@swc/cli": ">=0.6.0 <0.9.0",