parcel 2.10.2 → 2.11.0

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.
Files changed (3) hide show
  1. package/lib/cli.js +3 -4
  2. package/package.json +14 -14
  3. package/src/cli.js +4 -10
package/lib/cli.js CHANGED
@@ -131,6 +131,7 @@ const commonOptions = {
131
131
  '--no-cache': 'disable the filesystem cache',
132
132
  '--config <path>': 'specify which config to use. can be a path or a package name',
133
133
  '--cache-dir <path>': 'set the cache directory. defaults to ".parcel-cache"',
134
+ '--watch-dir <path>': 'set the root watch directory. defaults to nearest lockfile or source control dir.',
134
135
  '--no-source-maps': 'disable sourcemaps',
135
136
  '--target [name]': ['only build given target(s)', (val, list) => list.concat([val]), []],
136
137
  '--log-level <level>': new (_commander().default.Option)('--log-level <level>', 'set the log level').choices(['none', 'error', 'warn', 'info', 'verbose']),
@@ -259,10 +260,7 @@ command) {
259
260
  // We don't use the SIGINT event for this because when run inside yarn, the parent
260
261
  // yarn process ends before Parcel and it appears that Parcel has ended while it may still
261
262
  // be cleaning up. Handling events from stdin prevents this impression.
262
-
263
- // Enqueue a busy message to be shown if Parcel doesn't shut down
264
- // within the timeout.
265
- setTimeout(() => _logger().INTERNAL_ORIGINAL_CONSOLE.log(_chalk().default.bold.yellowBright('Parcel is shutting down...')), 500);
263
+ //
266
264
  // When watching, a 0 success code is acceptable when Parcel is interrupted with ctrl-c.
267
265
  // When building, fail with a code as if we received a SIGINT.
268
266
  await exit(isWatching ? 0 : SIGINT_EXIT_CODE);
@@ -431,6 +429,7 @@ async function normalizeOptions(command, inputFS) {
431
429
  return {
432
430
  shouldDisableCache: command.cache === false,
433
431
  cacheDir: command.cacheDir,
432
+ watchDir: command.watchDir,
434
433
  config: command.config,
435
434
  mode,
436
435
  hmrOptions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parcel",
3
- "version": "2.10.2",
3
+ "version": "2.11.0",
4
4
  "description": "Blazing fast, zero configuration web application bundler",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -21,24 +21,24 @@
21
21
  "node": ">= 12.0.0"
22
22
  },
23
23
  "dependencies": {
24
- "@parcel/config-default": "2.10.2",
25
- "@parcel/core": "2.10.2",
26
- "@parcel/diagnostic": "2.10.2",
27
- "@parcel/events": "2.10.2",
28
- "@parcel/fs": "2.10.2",
29
- "@parcel/logger": "2.10.2",
30
- "@parcel/package-manager": "2.10.2",
31
- "@parcel/reporter-cli": "2.10.2",
32
- "@parcel/reporter-dev-server": "2.10.2",
33
- "@parcel/reporter-tracer": "2.10.2",
34
- "@parcel/utils": "2.10.2",
24
+ "@parcel/config-default": "2.11.0",
25
+ "@parcel/core": "2.11.0",
26
+ "@parcel/diagnostic": "2.11.0",
27
+ "@parcel/events": "2.11.0",
28
+ "@parcel/fs": "2.11.0",
29
+ "@parcel/logger": "2.11.0",
30
+ "@parcel/package-manager": "2.11.0",
31
+ "@parcel/reporter-cli": "2.11.0",
32
+ "@parcel/reporter-dev-server": "2.11.0",
33
+ "@parcel/reporter-tracer": "2.11.0",
34
+ "@parcel/utils": "2.11.0",
35
35
  "chalk": "^4.1.0",
36
36
  "commander": "^7.0.0",
37
37
  "get-port": "^4.2.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@babel/core": "^7.22.11",
41
- "@parcel/babel-register": "2.10.2"
41
+ "@parcel/babel-register": "2.11.0"
42
42
  },
43
- "gitHead": "a1391ed8a719fc2f976dbadb528ca2dcffa7da12"
43
+ "gitHead": "f8076f1644cabc944695b5ec82602c8ae32bcf21"
44
44
  }
package/src/cli.js CHANGED
@@ -73,6 +73,8 @@ const commonOptions = {
73
73
  '--config <path>':
74
74
  'specify which config to use. can be a path or a package name',
75
75
  '--cache-dir <path>': 'set the cache directory. defaults to ".parcel-cache"',
76
+ '--watch-dir <path>':
77
+ 'set the root watch directory. defaults to nearest lockfile or source control dir.',
76
78
  '--no-source-maps': 'disable sourcemaps',
77
79
  '--target [name]': [
78
80
  'only build given target(s)',
@@ -285,16 +287,7 @@ async function run(
285
287
  // We don't use the SIGINT event for this because when run inside yarn, the parent
286
288
  // yarn process ends before Parcel and it appears that Parcel has ended while it may still
287
289
  // be cleaning up. Handling events from stdin prevents this impression.
288
-
289
- // Enqueue a busy message to be shown if Parcel doesn't shut down
290
- // within the timeout.
291
- setTimeout(
292
- () =>
293
- INTERNAL_ORIGINAL_CONSOLE.log(
294
- chalk.bold.yellowBright('Parcel is shutting down...'),
295
- ),
296
- 500,
297
- );
290
+ //
298
291
  // When watching, a 0 success code is acceptable when Parcel is interrupted with ctrl-c.
299
292
  // When building, fail with a code as if we received a SIGINT.
300
293
  await exit(isWatching ? 0 : SIGINT_EXIT_CODE);
@@ -482,6 +475,7 @@ async function normalizeOptions(
482
475
  return {
483
476
  shouldDisableCache: command.cache === false,
484
477
  cacheDir: command.cacheDir,
478
+ watchDir: command.watchDir,
485
479
  config: command.config,
486
480
  mode,
487
481
  hmrOptions,