@utoo/pack 1.3.6 → 1.3.7-alpha.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/cjs/core/project.js +12 -0
- package/esm/core/project.js +12 -0
- package/package.json +9 -9
package/cjs/core/project.js
CHANGED
|
@@ -39,6 +39,7 @@ const path_1 = require("path");
|
|
|
39
39
|
const util_1 = require("util");
|
|
40
40
|
const binding = __importStar(require("../binding"));
|
|
41
41
|
const common_1 = require("../utils/common");
|
|
42
|
+
const normalize_path_1 = require("../utils/normalize-path");
|
|
42
43
|
const loaderWorkerPool_1 = require("./loaderWorkerPool");
|
|
43
44
|
/**
|
|
44
45
|
* An error caused by a bug in Turbopack, and not the user's code (e.g. a Rust panic). These should
|
|
@@ -206,14 +207,25 @@ function serializeModuleRules(turbopackRules) {
|
|
|
206
207
|
async function rustifyPartialProjectOptions(options) {
|
|
207
208
|
return {
|
|
208
209
|
...options,
|
|
210
|
+
rootPath: normalizePathOption(options.rootPath),
|
|
211
|
+
projectPath: normalizePathOption(options.projectPath),
|
|
212
|
+
packPath: normalizePathOption(options.packPath),
|
|
209
213
|
config: options.config && (await serializeConfig(options.config)),
|
|
210
214
|
processEnv: options.processEnv && (0, common_1.rustifyEnv)(options.processEnv),
|
|
211
215
|
};
|
|
212
216
|
}
|
|
217
|
+
function normalizePathOption(pathLike) {
|
|
218
|
+
if (pathLike === undefined)
|
|
219
|
+
return undefined;
|
|
220
|
+
return (0, normalize_path_1.normalizePath)(pathLike);
|
|
221
|
+
}
|
|
213
222
|
async function rustifyProjectOptions(options) {
|
|
214
223
|
var _a;
|
|
215
224
|
return {
|
|
216
225
|
...options,
|
|
226
|
+
rootPath: (0, normalize_path_1.normalizePath)(options.rootPath),
|
|
227
|
+
projectPath: (0, normalize_path_1.normalizePath)(options.projectPath),
|
|
228
|
+
packPath: (0, normalize_path_1.normalizePath)(options.packPath),
|
|
217
229
|
config: await serializeConfig(options.config),
|
|
218
230
|
processEnv: (0, common_1.rustifyEnv)((_a = options.processEnv) !== null && _a !== void 0 ? _a : {}),
|
|
219
231
|
};
|
package/esm/core/project.js
CHANGED
|
@@ -2,6 +2,7 @@ import { resolve } from "path";
|
|
|
2
2
|
import { isDeepStrictEqual } from "util";
|
|
3
3
|
import * as binding from "../binding.js";
|
|
4
4
|
import { getPackPath, rustifyEnv } from "../utils/common.js";
|
|
5
|
+
import { normalizePath } from "../utils/normalize-path.js";
|
|
5
6
|
import { runLoaderWorkerPool } from "./loaderWorkerPool.js";
|
|
6
7
|
/**
|
|
7
8
|
* An error caused by a bug in Turbopack, and not the user's code (e.g. a Rust panic). These should
|
|
@@ -168,14 +169,25 @@ function serializeModuleRules(turbopackRules) {
|
|
|
168
169
|
async function rustifyPartialProjectOptions(options) {
|
|
169
170
|
return {
|
|
170
171
|
...options,
|
|
172
|
+
rootPath: normalizePathOption(options.rootPath),
|
|
173
|
+
projectPath: normalizePathOption(options.projectPath),
|
|
174
|
+
packPath: normalizePathOption(options.packPath),
|
|
171
175
|
config: options.config && (await serializeConfig(options.config)),
|
|
172
176
|
processEnv: options.processEnv && rustifyEnv(options.processEnv),
|
|
173
177
|
};
|
|
174
178
|
}
|
|
179
|
+
function normalizePathOption(pathLike) {
|
|
180
|
+
if (pathLike === undefined)
|
|
181
|
+
return undefined;
|
|
182
|
+
return normalizePath(pathLike);
|
|
183
|
+
}
|
|
175
184
|
async function rustifyProjectOptions(options) {
|
|
176
185
|
var _a;
|
|
177
186
|
return {
|
|
178
187
|
...options,
|
|
188
|
+
rootPath: normalizePath(options.rootPath),
|
|
189
|
+
projectPath: normalizePath(options.projectPath),
|
|
190
|
+
packPath: normalizePath(options.packPath),
|
|
179
191
|
config: await serializeConfig(options.config),
|
|
180
192
|
processEnv: rustifyEnv((_a = options.processEnv) !== null && _a !== void 0 ? _a : {}),
|
|
181
193
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utoo/pack",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7-alpha.1",
|
|
4
4
|
"main": "cjs/index.js",
|
|
5
5
|
"module": "esm/index.js",
|
|
6
6
|
"types": "esm/index.d.ts",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@hono/node-server": "^1.19.11",
|
|
42
42
|
"@hono/node-ws": "^1.3.0",
|
|
43
43
|
"@swc/helpers": "0.5.15",
|
|
44
|
-
"@utoo/pack-shared": "1.3.
|
|
44
|
+
"@utoo/pack-shared": "1.3.7-alpha.1",
|
|
45
45
|
"domparser-rs": "^0.0.7",
|
|
46
46
|
"find-up": "4.1.0",
|
|
47
47
|
"get-port": "^7.1.0",
|
|
@@ -92,12 +92,12 @@
|
|
|
92
92
|
},
|
|
93
93
|
"repository": "git@github.com:utooland/utoo.git",
|
|
94
94
|
"optionalDependencies": {
|
|
95
|
-
"@utoo/pack-darwin-arm64": "1.3.
|
|
96
|
-
"@utoo/pack-darwin-x64": "1.3.
|
|
97
|
-
"@utoo/pack-linux-arm64-gnu": "1.3.
|
|
98
|
-
"@utoo/pack-linux-arm64-musl": "1.3.
|
|
99
|
-
"@utoo/pack-linux-x64-gnu": "1.3.
|
|
100
|
-
"@utoo/pack-linux-x64-musl": "1.3.
|
|
101
|
-
"@utoo/pack-win32-x64-msvc": "1.3.
|
|
95
|
+
"@utoo/pack-darwin-arm64": "1.3.7-alpha.1",
|
|
96
|
+
"@utoo/pack-darwin-x64": "1.3.7-alpha.1",
|
|
97
|
+
"@utoo/pack-linux-arm64-gnu": "1.3.7-alpha.1",
|
|
98
|
+
"@utoo/pack-linux-arm64-musl": "1.3.7-alpha.1",
|
|
99
|
+
"@utoo/pack-linux-x64-gnu": "1.3.7-alpha.1",
|
|
100
|
+
"@utoo/pack-linux-x64-musl": "1.3.7-alpha.1",
|
|
101
|
+
"@utoo/pack-win32-x64-msvc": "1.3.7-alpha.1"
|
|
102
102
|
}
|
|
103
103
|
}
|