parcel 2.0.0-rc.0 → 2.1.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.
Files changed (4) hide show
  1. package/README.md +36 -1515
  2. package/lib/cli.js +6 -1
  3. package/package.json +13 -13
  4. package/src/cli.js +11 -8
package/lib/cli.js CHANGED
@@ -119,7 +119,8 @@ async function logUncaughtError(e) {
119
119
  message,
120
120
  codeframe,
121
121
  stack,
122
- hints
122
+ hints,
123
+ documentation
123
124
  } = await (0, _utils().prettyDiagnostic)(diagnostic);
124
125
 
125
126
  _logger().INTERNAL_ORIGINAL_CONSOLE.error(_chalk().default.red(message));
@@ -139,6 +140,10 @@ async function logUncaughtError(e) {
139
140
  for (let h of hints) {
140
141
  _logger().INTERNAL_ORIGINAL_CONSOLE.error(_chalk().default.blue(h));
141
142
  }
143
+
144
+ if (documentation) {
145
+ _logger().INTERNAL_ORIGINAL_CONSOLE.error(_chalk().default.magenta.bold(documentation));
146
+ }
142
147
  }
143
148
  } else {
144
149
  _logger().INTERNAL_ORIGINAL_CONSOLE.error(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parcel",
3
- "version": "2.0.0-rc.0",
3
+ "version": "2.1.1",
4
4
  "description": "Blazing fast, zero configuration web application bundler",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -21,23 +21,23 @@
21
21
  "node": ">= 12.0.0"
22
22
  },
23
23
  "dependencies": {
24
- "@parcel/config-default": "2.0.0-rc.0",
25
- "@parcel/core": "2.0.0-rc.0",
26
- "@parcel/diagnostic": "2.0.0-rc.0",
27
- "@parcel/events": "2.0.0-rc.0",
28
- "@parcel/fs": "2.0.0-rc.0",
29
- "@parcel/logger": "2.0.0-rc.0",
30
- "@parcel/package-manager": "2.0.0-rc.0",
31
- "@parcel/reporter-cli": "2.0.0-rc.0",
32
- "@parcel/reporter-dev-server": "2.0.0-rc.0",
33
- "@parcel/utils": "2.0.0-rc.0",
24
+ "@parcel/config-default": "^2.1.1",
25
+ "@parcel/core": "^2.1.1",
26
+ "@parcel/diagnostic": "^2.1.1",
27
+ "@parcel/events": "^2.1.1",
28
+ "@parcel/fs": "^2.1.1",
29
+ "@parcel/logger": "^2.1.1",
30
+ "@parcel/package-manager": "^2.1.1",
31
+ "@parcel/reporter-cli": "^2.1.1",
32
+ "@parcel/reporter-dev-server": "^2.1.1",
33
+ "@parcel/utils": "^2.1.1",
34
34
  "chalk": "^4.1.0",
35
35
  "commander": "^7.0.0",
36
36
  "get-port": "^4.2.0",
37
37
  "v8-compile-cache": "^2.0.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@parcel/babel-register": "2.0.0-rc.0"
40
+ "@parcel/babel-register": "^2.1.1"
41
41
  },
42
- "gitHead": "8fc248f1f8eeb4428f7abd768bd23111451b1903"
42
+ "gitHead": "f53ffe772a8259d94ca2937d02fde149454112f3"
43
43
  }
package/src/cli.js CHANGED
@@ -25,9 +25,8 @@ const SIGINT_EXIT_CODE = 130;
25
25
  async function logUncaughtError(e: mixed) {
26
26
  if (e instanceof ThrowableDiagnostic) {
27
27
  for (let diagnostic of e.diagnostics) {
28
- let {message, codeframe, stack, hints} = await prettyDiagnostic(
29
- diagnostic,
30
- );
28
+ let {message, codeframe, stack, hints, documentation} =
29
+ await prettyDiagnostic(diagnostic);
31
30
  INTERNAL_ORIGINAL_CONSOLE.error(chalk.red(message));
32
31
  if (codeframe || stack) {
33
32
  INTERNAL_ORIGINAL_CONSOLE.error('');
@@ -40,6 +39,9 @@ async function logUncaughtError(e: mixed) {
40
39
  for (let h of hints) {
41
40
  INTERNAL_ORIGINAL_CONSOLE.error(chalk.blue(h));
42
41
  }
42
+ if (documentation) {
43
+ INTERNAL_ORIGINAL_CONSOLE.error(chalk.magenta.bold(documentation));
44
+ }
43
45
  }
44
46
  } else {
45
47
  INTERNAL_ORIGINAL_CONSOLE.error(e);
@@ -170,12 +172,12 @@ applyOptions(build, commonOptions);
170
172
  program
171
173
  .command('help [command]')
172
174
  .description('display help information for a command')
173
- .action(function(command) {
175
+ .action(function (command) {
174
176
  let cmd = program.commands.find(c => c.name() === command) || program;
175
177
  cmd.help();
176
178
  });
177
179
 
178
- program.on('--help', function() {
180
+ program.on('--help', function () {
179
181
  INTERNAL_ORIGINAL_CONSOLE.log('');
180
182
  INTERNAL_ORIGINAL_CONSOLE.log(
181
183
  ' Run `' +
@@ -186,7 +188,7 @@ program.on('--help', function() {
186
188
  });
187
189
 
188
190
  // Override to output option description if argument was missing
189
- commander.Command.prototype.optionMissingArgument = function(option) {
191
+ commander.Command.prototype.optionMissingArgument = function (option) {
190
192
  INTERNAL_ORIGINAL_CONSOLE.error(
191
193
  "error: option `%s' argument missing",
192
194
  option.flags,
@@ -318,8 +320,9 @@ async function run(
318
320
 
319
321
  if (command.open && options.serveOptions) {
320
322
  await openInBrowser(
321
- `${options.serveOptions.https ? 'https' : 'http'}://${options
322
- .serveOptions.host || 'localhost'}:${options.serveOptions.port}`,
323
+ `${options.serveOptions.https ? 'https' : 'http'}://${
324
+ options.serveOptions.host || 'localhost'
325
+ }:${options.serveOptions.port}`,
323
326
  command.open,
324
327
  );
325
328
  }