parcel 2.0.0-dev.1546 → 2.0.0-dev.1555
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/bin/parcel.js +2 -0
- package/lib/cli.js +4 -6
- package/package.json +23 -18
- package/src/cli.js +1 -1
package/bin/parcel.js
ADDED
package/lib/cli.js
CHANGED
|
@@ -183,15 +183,14 @@ const commonOptions = {
|
|
|
183
183
|
'--feature-flag <name=value>': ['sets the value of a feature flag', (value, previousValue) => {
|
|
184
184
|
let [name, val] = value.split('=');
|
|
185
185
|
if (name in _featureFlags().DEFAULT_FEATURE_FLAGS) {
|
|
186
|
-
var _featureFlagValue;
|
|
187
186
|
let featureFlagValue;
|
|
188
187
|
if (typeof _featureFlags().DEFAULT_FEATURE_FLAGS[name] === 'boolean') {
|
|
189
188
|
if (val !== 'true' && val !== 'false') {
|
|
190
189
|
throw new Error(`Feature flag ${name} must be set to true or false`);
|
|
191
190
|
}
|
|
192
|
-
featureFlagValue = val;
|
|
191
|
+
featureFlagValue = val === 'true';
|
|
193
192
|
}
|
|
194
|
-
previousValue[name] =
|
|
193
|
+
previousValue[name] = featureFlagValue ?? String(val);
|
|
195
194
|
} else {
|
|
196
195
|
_logger().INTERNAL_ORIGINAL_CONSOLE.warn(`Unknown feature flag ${name} specified, it will be ignored`);
|
|
197
196
|
}
|
|
@@ -383,7 +382,6 @@ function parseOptionInt(value) {
|
|
|
383
382
|
return parsedValue;
|
|
384
383
|
}
|
|
385
384
|
async function normalizeOptions(command, inputFS) {
|
|
386
|
-
var _command$autoinstall, _command$sourceMaps;
|
|
387
385
|
let nodeEnv;
|
|
388
386
|
if (command.name() === 'build') {
|
|
389
387
|
nodeEnv = process.env.NODE_ENV || 'production';
|
|
@@ -490,7 +488,7 @@ async function normalizeOptions(command, inputFS) {
|
|
|
490
488
|
shouldContentHash: hmrOptions ? false : command.contentHash,
|
|
491
489
|
serveOptions,
|
|
492
490
|
targets: command.target.length > 0 ? command.target : null,
|
|
493
|
-
shouldAutoInstall:
|
|
491
|
+
shouldAutoInstall: command.autoinstall ?? true,
|
|
494
492
|
logLevel: command.logLevel,
|
|
495
493
|
shouldProfile: command.profile,
|
|
496
494
|
shouldTrace: command.trace,
|
|
@@ -507,7 +505,7 @@ async function normalizeOptions(command, inputFS) {
|
|
|
507
505
|
additionalReporters,
|
|
508
506
|
defaultTargetOptions: {
|
|
509
507
|
shouldOptimize: command.optimize != null ? command.optimize : mode === 'production',
|
|
510
|
-
sourceMaps:
|
|
508
|
+
sourceMaps: command.sourceMaps ?? true,
|
|
511
509
|
shouldScopeHoist: command.scopeHoist,
|
|
512
510
|
publicUrl: command.publicUrl,
|
|
513
511
|
distDir: command.distDir
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "parcel",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.1555+e87c13686",
|
|
4
4
|
"description": "Blazing fast, zero configuration web application bundler",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -14,32 +14,37 @@
|
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "https://github.com/parcel-bundler/parcel.git"
|
|
16
16
|
},
|
|
17
|
-
"bin": "
|
|
17
|
+
"bin": "bin/parcel.js",
|
|
18
18
|
"main": "lib/bin.js",
|
|
19
19
|
"source": "src/bin.js",
|
|
20
|
+
"scripts": {
|
|
21
|
+
"prepack": "./ensure-no-dev-lib.sh",
|
|
22
|
+
"dev:prepare": "rimraf ./lib/ && mkdir -p lib && cp ./bin/dev-bin.js ./lib/bin.js"
|
|
23
|
+
},
|
|
20
24
|
"engines": {
|
|
21
|
-
"node": ">=
|
|
25
|
+
"node": ">= 16.0.0"
|
|
22
26
|
},
|
|
23
27
|
"dependencies": {
|
|
24
|
-
"@parcel/config-default": "2.0.0-dev.
|
|
25
|
-
"@parcel/core": "2.0.0-dev.
|
|
26
|
-
"@parcel/diagnostic": "2.0.0-dev.
|
|
27
|
-
"@parcel/events": "2.0.0-dev.
|
|
28
|
-
"@parcel/feature-flags": "2.12.1-dev.
|
|
29
|
-
"@parcel/fs": "2.0.0-dev.
|
|
30
|
-
"@parcel/logger": "2.0.0-dev.
|
|
31
|
-
"@parcel/package-manager": "2.0.0-dev.
|
|
32
|
-
"@parcel/reporter-cli": "2.0.0-dev.
|
|
33
|
-
"@parcel/reporter-dev-server": "2.0.0-dev.
|
|
34
|
-
"@parcel/reporter-tracer": "2.12.1-dev.
|
|
35
|
-
"@parcel/utils": "2.0.0-dev.
|
|
28
|
+
"@parcel/config-default": "2.0.0-dev.1557+e87c13686",
|
|
29
|
+
"@parcel/core": "2.0.0-dev.1555+e87c13686",
|
|
30
|
+
"@parcel/diagnostic": "2.0.0-dev.1557+e87c13686",
|
|
31
|
+
"@parcel/events": "2.0.0-dev.1557+e87c13686",
|
|
32
|
+
"@parcel/feature-flags": "2.12.1-dev.3204+e87c13686",
|
|
33
|
+
"@parcel/fs": "2.0.0-dev.1557+e87c13686",
|
|
34
|
+
"@parcel/logger": "2.0.0-dev.1557+e87c13686",
|
|
35
|
+
"@parcel/package-manager": "2.0.0-dev.1557+e87c13686",
|
|
36
|
+
"@parcel/reporter-cli": "2.0.0-dev.1557+e87c13686",
|
|
37
|
+
"@parcel/reporter-dev-server": "2.0.0-dev.1557+e87c13686",
|
|
38
|
+
"@parcel/reporter-tracer": "2.12.1-dev.3204+e87c13686",
|
|
39
|
+
"@parcel/utils": "2.0.0-dev.1557+e87c13686",
|
|
36
40
|
"chalk": "^4.1.0",
|
|
37
41
|
"commander": "^7.0.0",
|
|
38
42
|
"get-port": "^4.2.0"
|
|
39
43
|
},
|
|
40
44
|
"devDependencies": {
|
|
41
45
|
"@babel/core": "^7.22.11",
|
|
42
|
-
"@parcel/babel-register": "2.12.0"
|
|
46
|
+
"@parcel/babel-register": "2.12.0",
|
|
47
|
+
"rimraf": "^5.0.5"
|
|
43
48
|
},
|
|
44
|
-
"gitHead": "
|
|
45
|
-
}
|
|
49
|
+
"gitHead": "e87c13686e8fa4ad96cc61c19d9e4fcf9c372f2e"
|
|
50
|
+
}
|
package/src/cli.js
CHANGED