parcel 2.0.0 → 2.2.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/README.md +1 -1
  2. package/package.json +13 -13
  3. package/src/cli.js +8 -12
package/README.md CHANGED
@@ -15,7 +15,7 @@ Parcel is a zero configuration build tool for the web. It combines a great out-o
15
15
 
16
16
  ## Features
17
17
 
18
- - 😍 **Zero config** – Parcel supports many languages and file types out of the box, from web technologies like HTML, CSS, and JavaScript, to assets like images, fonts, videos, and more. It has a built in dev server with hot reloading, beautiful error diagnostics, and much more. No configuration needed!
18
+ - 😍 **Zero config** – Parcel supports many languages and file types out of the box, from web technologies like HTML, CSS, and JavaScript, to assets like images, fonts, videos, and more. It has a built-in dev server with hot reloading, beautiful error diagnostics, and much more. No configuration needed!
19
19
  - ⚡️ **Lighting fast** – Parcel's JavaScript compiler is written in Rust for native performance. Your code is built in parallel using worker threads, utilizing all of the cores on your machine. Everything is cached, so you never build the same code twice. It's like using watch mode, but even when you restart Parcel!
20
20
  - 🚀 **Automatic production optimization** – Parcel optimizes your whole app for production automatically. This includes tree-shaking and minifying your JavaScript, CSS, and HTML, resizing and optimizing images, content hashing, automatic code splitting, and much more.
21
21
  - 🎯 **Ship for any target** – Parcel automatically transforms your code for your target environments. From modern and legacy browser support, to zero config JSX and TypeScript compilation, Parcel makes it easy to build for any target – or many!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parcel",
3
- "version": "2.0.0",
3
+ "version": "2.2.0",
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",
25
- "@parcel/core": "^2.0.0",
26
- "@parcel/diagnostic": "^2.0.0",
27
- "@parcel/events": "^2.0.0",
28
- "@parcel/fs": "^2.0.0",
29
- "@parcel/logger": "^2.0.0",
30
- "@parcel/package-manager": "^2.0.0",
31
- "@parcel/reporter-cli": "^2.0.0",
32
- "@parcel/reporter-dev-server": "^2.0.0",
33
- "@parcel/utils": "^2.0.0",
24
+ "@parcel/config-default": "^2.2.0",
25
+ "@parcel/core": "^2.2.0",
26
+ "@parcel/diagnostic": "^2.2.0",
27
+ "@parcel/events": "^2.2.0",
28
+ "@parcel/fs": "^2.2.0",
29
+ "@parcel/logger": "^2.2.0",
30
+ "@parcel/package-manager": "^2.2.0",
31
+ "@parcel/reporter-cli": "^2.2.0",
32
+ "@parcel/reporter-dev-server": "^2.2.0",
33
+ "@parcel/utils": "^2.2.0",
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"
40
+ "@parcel/babel-register": "^2.2.0"
41
41
  },
42
- "gitHead": "84da50ae6943bff9741e2fc76d2f4968074cbbd6"
42
+ "gitHead": "4745cd3023f8d5a5adcf9e565d5b82d1418dc262"
43
43
  }
package/src/cli.js CHANGED
@@ -25,13 +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 {
29
- message,
30
- codeframe,
31
- stack,
32
- hints,
33
- documentation,
34
- } = await prettyDiagnostic(diagnostic);
28
+ let {message, codeframe, stack, hints, documentation} =
29
+ await prettyDiagnostic(diagnostic);
35
30
  INTERNAL_ORIGINAL_CONSOLE.error(chalk.red(message));
36
31
  if (codeframe || stack) {
37
32
  INTERNAL_ORIGINAL_CONSOLE.error('');
@@ -177,12 +172,12 @@ applyOptions(build, commonOptions);
177
172
  program
178
173
  .command('help [command]')
179
174
  .description('display help information for a command')
180
- .action(function(command) {
175
+ .action(function (command) {
181
176
  let cmd = program.commands.find(c => c.name() === command) || program;
182
177
  cmd.help();
183
178
  });
184
179
 
185
- program.on('--help', function() {
180
+ program.on('--help', function () {
186
181
  INTERNAL_ORIGINAL_CONSOLE.log('');
187
182
  INTERNAL_ORIGINAL_CONSOLE.log(
188
183
  ' Run `' +
@@ -193,7 +188,7 @@ program.on('--help', function() {
193
188
  });
194
189
 
195
190
  // Override to output option description if argument was missing
196
- commander.Command.prototype.optionMissingArgument = function(option) {
191
+ commander.Command.prototype.optionMissingArgument = function (option) {
197
192
  INTERNAL_ORIGINAL_CONSOLE.error(
198
193
  "error: option `%s' argument missing",
199
194
  option.flags,
@@ -325,8 +320,9 @@ async function run(
325
320
 
326
321
  if (command.open && options.serveOptions) {
327
322
  await openInBrowser(
328
- `${options.serveOptions.https ? 'https' : 'http'}://${options
329
- .serveOptions.host || 'localhost'}:${options.serveOptions.port}`,
323
+ `${options.serveOptions.https ? 'https' : 'http'}://${
324
+ options.serveOptions.host || 'localhost'
325
+ }:${options.serveOptions.port}`,
330
326
  command.open,
331
327
  );
332
328
  }