@nx/js 23.2.0-beta.11 → 23.2.0-beta.12
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ExecutorContext } from '@nx/devkit';
|
|
2
2
|
import { NormalizedSwcExecutorOptions } from '../schema';
|
|
3
|
+
export declare function getSwcCmd({ swcCliOptions: { swcrcPath, destPath, stripLeadingPaths }, root, projectRoot, sourceRoot, main, }: NormalizedSwcExecutorOptions, watch?: boolean): string;
|
|
3
4
|
export declare function compileSwc(context: ExecutorContext, normalizedOptions: NormalizedSwcExecutorOptions, postCompilationCallback: () => Promise<void>): Promise<{
|
|
4
5
|
success: boolean;
|
|
5
6
|
outfile?: undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSwcCmd = getSwcCmd;
|
|
3
4
|
exports.compileSwc = compileSwc;
|
|
4
5
|
exports.compileSwcWatch = compileSwcWatch;
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
@@ -10,11 +11,15 @@ const node_path_1 = require("node:path");
|
|
|
10
11
|
const print_diagnostics_1 = require("../typescript/print-diagnostics");
|
|
11
12
|
const run_type_check_1 = require("../typescript/run-type-check");
|
|
12
13
|
const path_1 = require("path");
|
|
13
|
-
function getSwcCmd({ swcCliOptions: { swcrcPath, destPath, stripLeadingPaths }, root, projectRoot, sourceRoot, }, watch = false) {
|
|
14
|
+
function getSwcCmd({ swcCliOptions: { swcrcPath, destPath, stripLeadingPaths }, root, projectRoot, sourceRoot, main, }, watch = false) {
|
|
14
15
|
const swcCLI = require.resolve('@swc/cli/bin/swc.js');
|
|
15
16
|
let inputDir;
|
|
16
17
|
if (sourceRoot) {
|
|
17
|
-
|
|
18
|
+
// A main entry outside sourceRoot (e.g. Next.js custom server at <projectRoot>/server)
|
|
19
|
+
// is only emitted when compiling from the project root.
|
|
20
|
+
inputDir = (0, path_1.relative)(sourceRoot, main).startsWith('..')
|
|
21
|
+
? '.'
|
|
22
|
+
: (0, path_1.relative)(projectRoot, sourceRoot);
|
|
18
23
|
}
|
|
19
24
|
else {
|
|
20
25
|
// If sourceRoot is not provided, check if `src` exists and use that instead.
|
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.12",
|
|
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.12",
|
|
151
|
+
"@nx/workspace": "23.2.0-beta.12"
|
|
152
152
|
},
|
|
153
153
|
"devDependencies": {
|
|
154
|
-
"@nx/esbuild": "23.2.0-beta.
|
|
155
|
-
"@nx/eslint": "23.2.0-beta.
|
|
156
|
-
"@nx/
|
|
157
|
-
"@nx/
|
|
158
|
-
"@nx/
|
|
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.12",
|
|
155
|
+
"@nx/eslint": "23.2.0-beta.12",
|
|
156
|
+
"@nx/oxlint": "23.2.0-beta.12",
|
|
157
|
+
"@nx/rollup": "23.2.0-beta.12",
|
|
158
|
+
"@nx/jest": "23.2.0-beta.12",
|
|
159
|
+
"@nx/vite": "23.2.0-beta.12",
|
|
160
|
+
"@nx/vitest": "23.2.0-beta.12",
|
|
161
|
+
"nx": "23.2.0-beta.12"
|
|
162
162
|
},
|
|
163
163
|
"peerDependencies": {
|
|
164
164
|
"@swc/cli": ">=0.6.0 <0.9.0",
|