@storm-software/workspace-tools 1.13.0 → 1.13.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
|
@@ -104542,12 +104542,9 @@ function useDirectory(directory, { create = true }) {
|
|
|
104542
104542
|
}
|
|
104543
104543
|
function getNodeModuleDirectory(workspaceRoot) {
|
|
104544
104544
|
const nodeModules = (0, import_node_path.join)(workspaceRoot, "node_modules");
|
|
104545
|
-
if (!isWritable2(nodeModules)) {
|
|
104545
|
+
if ((0, import_node_fs.existsSync)(nodeModules) && !isWritable2(nodeModules)) {
|
|
104546
104546
|
throw new Error("Cannot write to node_modules directory");
|
|
104547
104547
|
}
|
|
104548
|
-
if ((0, import_node_fs.existsSync)(nodeModules) || !isWritable2((0, import_node_path.join)(workspaceRoot))) {
|
|
104549
|
-
return void 0;
|
|
104550
|
-
}
|
|
104551
104548
|
return nodeModules;
|
|
104552
104549
|
}
|
|
104553
104550
|
function findCacheDirectory({
|
|
@@ -104783,14 +104780,15 @@ function workerConfig({
|
|
|
104783
104780
|
entry,
|
|
104784
104781
|
format: ["esm"],
|
|
104785
104782
|
target: ["chrome95"],
|
|
104783
|
+
bundle: true,
|
|
104786
104784
|
tsconfig,
|
|
104787
104785
|
projectRoot,
|
|
104788
104786
|
workspaceRoot,
|
|
104789
|
-
outDir: (0, import_path2.join)(outDir, "dist"
|
|
104787
|
+
outDir: (0, import_path2.join)(outDir, "dist"),
|
|
104790
104788
|
silent: !verbose,
|
|
104791
104789
|
metafile: true,
|
|
104792
104790
|
shims: true,
|
|
104793
|
-
minify:
|
|
104791
|
+
minify: true,
|
|
104794
104792
|
external,
|
|
104795
104793
|
platform: "browser",
|
|
104796
104794
|
banner,
|
|
@@ -104871,11 +104869,10 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
104871
104869
|
}),
|
|
104872
104870
|
options
|
|
104873
104871
|
};
|
|
104874
|
-
|
|
104875
|
-
|
|
104876
|
-
config.push(workerConfig(params));
|
|
104872
|
+
if (platform === "worker") {
|
|
104873
|
+
return (0, import_tsup.defineConfig)(workerConfig(params));
|
|
104877
104874
|
}
|
|
104878
|
-
return (0, import_tsup.defineConfig)(
|
|
104875
|
+
return (0, import_tsup.defineConfig)([modernConfig(params), legacyConfig(params)]);
|
|
104879
104876
|
}
|
|
104880
104877
|
var outExtension = ({ options, format: format2, pkgType }) => {
|
|
104881
104878
|
console.log(options);
|
|
@@ -71969,12 +71969,9 @@ function useDirectory(directory, { create = true }) {
|
|
|
71969
71969
|
}
|
|
71970
71970
|
function getNodeModuleDirectory(workspaceRoot) {
|
|
71971
71971
|
const nodeModules = (0, import_node_path.join)(workspaceRoot, "node_modules");
|
|
71972
|
-
if (!isWritable2(nodeModules)) {
|
|
71972
|
+
if ((0, import_node_fs.existsSync)(nodeModules) && !isWritable2(nodeModules)) {
|
|
71973
71973
|
throw new Error("Cannot write to node_modules directory");
|
|
71974
71974
|
}
|
|
71975
|
-
if ((0, import_node_fs.existsSync)(nodeModules) || !isWritable2((0, import_node_path.join)(workspaceRoot))) {
|
|
71976
|
-
return void 0;
|
|
71977
|
-
}
|
|
71978
71975
|
return nodeModules;
|
|
71979
71976
|
}
|
|
71980
71977
|
function findCacheDirectory({
|
|
@@ -72210,14 +72207,15 @@ function workerConfig({
|
|
|
72210
72207
|
entry,
|
|
72211
72208
|
format: ["esm"],
|
|
72212
72209
|
target: ["chrome95"],
|
|
72210
|
+
bundle: true,
|
|
72213
72211
|
tsconfig,
|
|
72214
72212
|
projectRoot,
|
|
72215
72213
|
workspaceRoot,
|
|
72216
|
-
outDir: (0, import_path2.join)(outDir, "dist"
|
|
72214
|
+
outDir: (0, import_path2.join)(outDir, "dist"),
|
|
72217
72215
|
silent: !verbose,
|
|
72218
72216
|
metafile: true,
|
|
72219
72217
|
shims: true,
|
|
72220
|
-
minify:
|
|
72218
|
+
minify: true,
|
|
72221
72219
|
external,
|
|
72222
72220
|
platform: "browser",
|
|
72223
72221
|
banner,
|
|
@@ -72298,11 +72296,10 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
72298
72296
|
}),
|
|
72299
72297
|
options
|
|
72300
72298
|
};
|
|
72301
|
-
|
|
72302
|
-
|
|
72303
|
-
config.push(workerConfig(params));
|
|
72299
|
+
if (platform === "worker") {
|
|
72300
|
+
return (0, import_tsup.defineConfig)(workerConfig(params));
|
|
72304
72301
|
}
|
|
72305
|
-
return (0, import_tsup.defineConfig)(
|
|
72302
|
+
return (0, import_tsup.defineConfig)([modernConfig(params), legacyConfig(params)]);
|
|
72306
72303
|
}
|
|
72307
72304
|
var outExtension = ({ options, format, pkgType }) => {
|
|
72308
72305
|
console.log(options);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { EsBuildExecutorOptions } from "@nx/esbuild/src/executors/esbuild/schema.d.ts";
|
|
2
2
|
import { Options } from "tsup";
|
|
3
3
|
|
|
4
|
+
export type Platform = "browser" | "neutral" | "node" | "worker";
|
|
5
|
+
|
|
4
6
|
export type TsupExecutorSchema = Omit<
|
|
5
7
|
EsBuildExecutorOptions,
|
|
6
8
|
| "main"
|
|
@@ -15,6 +17,7 @@ export type TsupExecutorSchema = Omit<
|
|
|
15
17
|
| "skipTypeCheck"
|
|
16
18
|
| "esbuildOptions"
|
|
17
19
|
| "esbuildConfig"
|
|
20
|
+
| "platform"
|
|
18
21
|
> & {
|
|
19
22
|
entry?: string;
|
|
20
23
|
options: Options;
|
|
@@ -28,4 +31,5 @@ export type TsupExecutorSchema = Omit<
|
|
|
28
31
|
docModel?: boolean;
|
|
29
32
|
tsdocMetadata?: boolean;
|
|
30
33
|
includeSrc?: boolean;
|
|
34
|
+
platform?: Platform;
|
|
31
35
|
};
|
package/src/utils/index.js
CHANGED
|
@@ -122,12 +122,9 @@ function useDirectory(directory, { create = true }) {
|
|
|
122
122
|
}
|
|
123
123
|
function getNodeModuleDirectory(workspaceRoot) {
|
|
124
124
|
const nodeModules = (0, import_node_path2.join)(workspaceRoot, "node_modules");
|
|
125
|
-
if (!isWritable(nodeModules)) {
|
|
125
|
+
if ((0, import_node_fs.existsSync)(nodeModules) && !isWritable(nodeModules)) {
|
|
126
126
|
throw new Error("Cannot write to node_modules directory");
|
|
127
127
|
}
|
|
128
|
-
if ((0, import_node_fs.existsSync)(nodeModules) || !isWritable((0, import_node_path2.join)(workspaceRoot))) {
|
|
129
|
-
return void 0;
|
|
130
|
-
}
|
|
131
128
|
return nodeModules;
|
|
132
129
|
}
|
|
133
130
|
function findCacheDirectory({
|