@utoo/pack 1.4.18-alpha.0 → 1.4.18-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/binding.d.ts +1 -13
- package/cjs/commands/build.js +0 -2
- package/cjs/core/hmr.js +0 -2
- package/config_schema.json +0 -28
- package/esm/binding.d.ts +1 -13
- package/esm/commands/build.js +0 -2
- package/esm/core/hmr.js +0 -2
- package/package.json +9 -9
package/cjs/binding.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export interface NapiTaskMessage {
|
|
|
27
27
|
data: Buffer
|
|
28
28
|
}
|
|
29
29
|
export declare function recvTaskMessageInWorker(workerId: number): Promise<NapiTaskMessage>
|
|
30
|
-
export declare function sendTaskMessage(message: NapiTaskMessage):
|
|
30
|
+
export declare function sendTaskMessage(message: NapiTaskMessage): void
|
|
31
31
|
export declare function lockfileTryAcquireSync(path: string, content?: string | undefined | null): { __napiType: "Lockfile" } | null
|
|
32
32
|
export declare function lockfileTryAcquire(path: string, content?: string | undefined | null): Promise<{ __napiType: "Lockfile" } | null>
|
|
33
33
|
export declare function lockfileUnlockSync(lockfile: { __napiType: "Lockfile" }): void
|
|
@@ -125,18 +125,6 @@ export interface NapiTurboEngineOptions {
|
|
|
125
125
|
dependencyTracking?: boolean
|
|
126
126
|
/** Hint that this turbo-tasks instance is for a short-lived one-shot session. */
|
|
127
127
|
isShortSession?: boolean
|
|
128
|
-
/** Turbopack memory eviction mode for the persistent cache. */
|
|
129
|
-
turbopackMemoryEviction?: MemoryEvictionMode
|
|
130
|
-
}
|
|
131
|
-
/** Turbopack's memory eviction strategy for the persistent cache. */
|
|
132
|
-
export const enum MemoryEvictionMode {
|
|
133
|
-
/** Never evict. */
|
|
134
|
-
Off = "off",
|
|
135
|
-
/**
|
|
136
|
-
* After every snapshot, evict all evictable tasks from memory, reloading
|
|
137
|
-
* them from disk on demand.
|
|
138
|
-
*/
|
|
139
|
-
Full = "full"
|
|
140
128
|
}
|
|
141
129
|
export declare function projectNew(options: NapiProjectOptions, turboEngineOptions: NapiTurboEngineOptions, napiCallbacks: NapiTurbopackCallbacksJsObject): Promise<{ __napiType: "Project" }>
|
|
142
130
|
export declare function projectUpdate(project: { __napiType: "Project" }, options: NapiPartialProjectOptions): Promise<void>
|
package/cjs/commands/build.js
CHANGED
|
@@ -39,7 +39,6 @@ async function buildInternal(bundleOptions, projectPath, rootPath) {
|
|
|
39
39
|
const resolvedProjectPath = projectPath || process.cwd();
|
|
40
40
|
const resolvedRootPath = rootPath || projectPath || process.cwd();
|
|
41
41
|
const persistentCaching = (_a = bundleOptions.config.persistentCaching) !== null && _a !== void 0 ? _a : true;
|
|
42
|
-
const turbopackMemoryEviction = (bundleOptions.config.turbopackMemoryEviction === false ? "off" : "full");
|
|
43
42
|
const shouldCreateWebpackStats = Boolean(process.env.ANALYZE) || Boolean(bundleOptions.config.stats);
|
|
44
43
|
(0, htmlEntry_1.processHtmlEntry)(bundleOptions.config, resolvedProjectPath);
|
|
45
44
|
(0, validateEntry_1.validateEntryPaths)(bundleOptions.config, resolvedProjectPath);
|
|
@@ -66,7 +65,6 @@ async function buildInternal(bundleOptions, projectPath, rootPath) {
|
|
|
66
65
|
packPath: (0, common_1.getPackPath)(),
|
|
67
66
|
}, {
|
|
68
67
|
persistentCaching,
|
|
69
|
-
turbopackMemoryEviction,
|
|
70
68
|
// Build mode is a short-lived, one-shot compilation, so avoid paying
|
|
71
69
|
// dependency graph bookkeeping cost unless the persistent cache needs it.
|
|
72
70
|
dependencyTracking: persistentCaching,
|
package/cjs/core/hmr.js
CHANGED
|
@@ -63,7 +63,6 @@ async function createHotReloader(bundleOptions, projectPath, rootPath) {
|
|
|
63
63
|
await (0, cleanOutput_1.cleanOutput)(bundleOptions.config, resolvedProjectPath);
|
|
64
64
|
const createProject = (0, project_1.projectFactory)();
|
|
65
65
|
const persistentCaching = (_a = bundleOptions.config.persistentCaching) !== null && _a !== void 0 ? _a : true;
|
|
66
|
-
const turbopackMemoryEviction = (bundleOptions.config.turbopackMemoryEviction === false ? "off" : "full");
|
|
67
66
|
const persistentCacheLock = await (0, lockfile_1.acquirePersistentCacheLock)(resolvedProjectPath, "utoo pack dev", persistentCaching);
|
|
68
67
|
const htmlConfigs = [
|
|
69
68
|
...(Array.isArray(bundleOptions.config.html)
|
|
@@ -103,7 +102,6 @@ async function createHotReloader(bundleOptions, projectPath, rootPath) {
|
|
|
103
102
|
packPath: (0, common_1.getPackPath)(),
|
|
104
103
|
}, {
|
|
105
104
|
persistentCaching,
|
|
106
|
-
turbopackMemoryEviction,
|
|
107
105
|
});
|
|
108
106
|
}
|
|
109
107
|
catch (error) {
|
package/config_schema.json
CHANGED
|
@@ -222,17 +222,6 @@
|
|
|
222
222
|
"string",
|
|
223
223
|
"null"
|
|
224
224
|
]
|
|
225
|
-
},
|
|
226
|
-
"turbopackMemoryEviction": {
|
|
227
|
-
"description": "Turbopack memory eviction mode for the persistent cache",
|
|
228
|
-
"anyOf": [
|
|
229
|
-
{
|
|
230
|
-
"$ref": "#/definitions/SchemaTurbopackMemoryEviction"
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
"type": "null"
|
|
234
|
-
}
|
|
235
|
-
]
|
|
236
225
|
}
|
|
237
226
|
},
|
|
238
227
|
"definitions": {
|
|
@@ -1762,23 +1751,6 @@
|
|
|
1762
1751
|
}
|
|
1763
1752
|
]
|
|
1764
1753
|
},
|
|
1765
|
-
"SchemaTurbopackMemoryEviction": {
|
|
1766
|
-
"description": "Turbopack memory eviction mode.",
|
|
1767
|
-
"anyOf": [
|
|
1768
|
-
{
|
|
1769
|
-
"type": "boolean"
|
|
1770
|
-
},
|
|
1771
|
-
{
|
|
1772
|
-
"$ref": "#/definitions/SchemaTurbopackMemoryEvictionMode"
|
|
1773
|
-
}
|
|
1774
|
-
]
|
|
1775
|
-
},
|
|
1776
|
-
"SchemaTurbopackMemoryEvictionMode": {
|
|
1777
|
-
"type": "string",
|
|
1778
|
-
"enum": [
|
|
1779
|
-
"full"
|
|
1780
|
-
]
|
|
1781
|
-
},
|
|
1782
1754
|
"SchemaTurbopackModuleType": {
|
|
1783
1755
|
"description": "Module type for a module rule (`type` / `moduleType` field).\n\nValues must match pack-core / Turbopack's `ConfiguredModuleType::parse()`.",
|
|
1784
1756
|
"type": "string",
|
package/esm/binding.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export interface NapiTaskMessage {
|
|
|
27
27
|
data: Buffer
|
|
28
28
|
}
|
|
29
29
|
export declare function recvTaskMessageInWorker(workerId: number): Promise<NapiTaskMessage>
|
|
30
|
-
export declare function sendTaskMessage(message: NapiTaskMessage):
|
|
30
|
+
export declare function sendTaskMessage(message: NapiTaskMessage): void
|
|
31
31
|
export declare function lockfileTryAcquireSync(path: string, content?: string | undefined | null): { __napiType: "Lockfile" } | null
|
|
32
32
|
export declare function lockfileTryAcquire(path: string, content?: string | undefined | null): Promise<{ __napiType: "Lockfile" } | null>
|
|
33
33
|
export declare function lockfileUnlockSync(lockfile: { __napiType: "Lockfile" }): void
|
|
@@ -125,18 +125,6 @@ export interface NapiTurboEngineOptions {
|
|
|
125
125
|
dependencyTracking?: boolean
|
|
126
126
|
/** Hint that this turbo-tasks instance is for a short-lived one-shot session. */
|
|
127
127
|
isShortSession?: boolean
|
|
128
|
-
/** Turbopack memory eviction mode for the persistent cache. */
|
|
129
|
-
turbopackMemoryEviction?: MemoryEvictionMode
|
|
130
|
-
}
|
|
131
|
-
/** Turbopack's memory eviction strategy for the persistent cache. */
|
|
132
|
-
export const enum MemoryEvictionMode {
|
|
133
|
-
/** Never evict. */
|
|
134
|
-
Off = "off",
|
|
135
|
-
/**
|
|
136
|
-
* After every snapshot, evict all evictable tasks from memory, reloading
|
|
137
|
-
* them from disk on demand.
|
|
138
|
-
*/
|
|
139
|
-
Full = "full"
|
|
140
128
|
}
|
|
141
129
|
export declare function projectNew(options: NapiProjectOptions, turboEngineOptions: NapiTurboEngineOptions, napiCallbacks: NapiTurbopackCallbacksJsObject): Promise<{ __napiType: "Project" }>
|
|
142
130
|
export declare function projectUpdate(project: { __napiType: "Project" }, options: NapiPartialProjectOptions): Promise<void>
|
package/esm/commands/build.js
CHANGED
|
@@ -33,7 +33,6 @@ async function buildInternal(bundleOptions, projectPath, rootPath) {
|
|
|
33
33
|
const resolvedProjectPath = projectPath || process.cwd();
|
|
34
34
|
const resolvedRootPath = rootPath || projectPath || process.cwd();
|
|
35
35
|
const persistentCaching = (_a = bundleOptions.config.persistentCaching) !== null && _a !== void 0 ? _a : true;
|
|
36
|
-
const turbopackMemoryEviction = (bundleOptions.config.turbopackMemoryEviction === false ? "off" : "full");
|
|
37
36
|
const shouldCreateWebpackStats = Boolean(process.env.ANALYZE) || Boolean(bundleOptions.config.stats);
|
|
38
37
|
processHtmlEntry(bundleOptions.config, resolvedProjectPath);
|
|
39
38
|
validateEntryPaths(bundleOptions.config, resolvedProjectPath);
|
|
@@ -60,7 +59,6 @@ async function buildInternal(bundleOptions, projectPath, rootPath) {
|
|
|
60
59
|
packPath: getPackPath(),
|
|
61
60
|
}, {
|
|
62
61
|
persistentCaching,
|
|
63
|
-
turbopackMemoryEviction,
|
|
64
62
|
// Build mode is a short-lived, one-shot compilation, so avoid paying
|
|
65
63
|
// dependency graph bookkeeping cost unless the persistent cache needs it.
|
|
66
64
|
dependencyTracking: persistentCaching,
|
package/esm/core/hmr.js
CHANGED
|
@@ -58,7 +58,6 @@ export async function createHotReloader(bundleOptions, projectPath, rootPath) {
|
|
|
58
58
|
await cleanOutput(bundleOptions.config, resolvedProjectPath);
|
|
59
59
|
const createProject = projectFactory();
|
|
60
60
|
const persistentCaching = (_a = bundleOptions.config.persistentCaching) !== null && _a !== void 0 ? _a : true;
|
|
61
|
-
const turbopackMemoryEviction = (bundleOptions.config.turbopackMemoryEviction === false ? "off" : "full");
|
|
62
61
|
const persistentCacheLock = await acquirePersistentCacheLock(resolvedProjectPath, "utoo pack dev", persistentCaching);
|
|
63
62
|
const htmlConfigs = [
|
|
64
63
|
...(Array.isArray(bundleOptions.config.html)
|
|
@@ -98,7 +97,6 @@ export async function createHotReloader(bundleOptions, projectPath, rootPath) {
|
|
|
98
97
|
packPath: getPackPath(),
|
|
99
98
|
}, {
|
|
100
99
|
persistentCaching,
|
|
101
|
-
turbopackMemoryEviction,
|
|
102
100
|
});
|
|
103
101
|
}
|
|
104
102
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utoo/pack",
|
|
3
|
-
"version": "1.4.18-alpha.
|
|
3
|
+
"version": "1.4.18-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.4.18-alpha.
|
|
44
|
+
"@utoo/pack-shared": "1.4.18-alpha.1",
|
|
45
45
|
"domparser-rs": "^0.0.7",
|
|
46
46
|
"find-up": "4.1.0",
|
|
47
47
|
"get-port": "5.1.1",
|
|
@@ -96,12 +96,12 @@
|
|
|
96
96
|
"directory": "packages/pack"
|
|
97
97
|
},
|
|
98
98
|
"optionalDependencies": {
|
|
99
|
-
"@utoo/pack-darwin-arm64": "1.4.18-alpha.
|
|
100
|
-
"@utoo/pack-darwin-x64": "1.4.18-alpha.
|
|
101
|
-
"@utoo/pack-linux-arm64-gnu": "1.4.18-alpha.
|
|
102
|
-
"@utoo/pack-linux-arm64-musl": "1.4.18-alpha.
|
|
103
|
-
"@utoo/pack-linux-x64-gnu": "1.4.18-alpha.
|
|
104
|
-
"@utoo/pack-linux-x64-musl": "1.4.18-alpha.
|
|
105
|
-
"@utoo/pack-win32-x64-msvc": "1.4.18-alpha.
|
|
99
|
+
"@utoo/pack-darwin-arm64": "1.4.18-alpha.1",
|
|
100
|
+
"@utoo/pack-darwin-x64": "1.4.18-alpha.1",
|
|
101
|
+
"@utoo/pack-linux-arm64-gnu": "1.4.18-alpha.1",
|
|
102
|
+
"@utoo/pack-linux-arm64-musl": "1.4.18-alpha.1",
|
|
103
|
+
"@utoo/pack-linux-x64-gnu": "1.4.18-alpha.1",
|
|
104
|
+
"@utoo/pack-linux-x64-musl": "1.4.18-alpha.1",
|
|
105
|
+
"@utoo/pack-win32-x64-msvc": "1.4.18-alpha.1"
|
|
106
106
|
}
|
|
107
107
|
}
|