Parcel: npm install parcel@next actually installs latest @nightly sub-packages

Created on 30 Jan 2020  路  5Comments  路  Source: parcel-bundler/parcel

馃悰 bug report

When i run npm i parcel@next or yarn add parcel@next the sub-packages of parcel (@parcel/core etc.) are resolved to the latest nightly version.

馃帥 Configuration (.babelrc, package.json, cli command)

empty folder with package.json

{ "name": "test" }

馃 Expected Behavior

When I install parcel@next or [email protected] I expect all internal sub-packages to also resolve to 2.0.0-alpha.3.2.

馃槸 Current Behavior

When I install parcel@next then @parcel/core (and all other sub-packages) are resolved to 2.0.0-nightly.65 (probably 66 by tomorrow etc.)

馃拋 Possible Solution

Tightly pin the internal sub-dependencies

馃敠 Context

I'm playing around with bleeding edge tooling and noticed this while debugging https://github.com/parcel-bundler/parcel/issues/4064

馃捇 Code Sample

package.json

{
  "name": "test",
  "dependencies": {
    "parcel": "2.0.0-alpha.3.1"
  }
}

package-lock.json (excerpt)

{
  "name": "test",
  "requires": true,
  "lockfileVersion": 1,
  "dependencies": {
    "parcel": {
      "version": "2.0.0-alpha.3.1",
      "resolved": "https://registry.npmjs.org/parcel/-/parcel-2.0.0-alpha.3.1.tgz",
      "integrity": "sha512-/j6L9OQKkiYTDnCAODFUYMkZYTraGqXksnGPRcdSFCQO3Mponr/gCHv9qZpVJmACPcM6JIjFKWyqoH+yjT7LKg==",
      "requires": {
        "@parcel/core": "^2.0.0-alpha.3.1",
        /* ... */
      }
    },
    "@parcel/core": {
      "version": "2.0.0-nightly.65",
      "resolved": "https://registry.npmjs.org/@parcel/core/-/core-2.0.0-nightly.65.tgz",
      "integrity": "sha512-77mVKKhRDZ+Pv94C+qPz5+D/XYJRqNcWBdyyJrHsVwjE1GBGSMEQ04V5rfK0b4obosl4Hk9qokrNzYdjDouItg==",
      "requires": {
        /* ... */
      },
      "dependencies": {
        /* ... */
      }
    }
  }
}

馃實 Your Environment

| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 2.0.0-alpha.3.1
| Node | 12.13.0
| npm | 6.13.4
| Operating System | MacOS 10.14

Bug

All 5 comments

To me it seems npm/yarn automatically installing a newer pre-release version is a bug on their side. ("^2.0.0-alpha.3.1" should always resolve the same as "2.0.0-alpha.3.1".

I'll try to open a PR that fixes this as we'll probably have to...

This is not resolved since no new release was filed after fixing the issue

@DeMoorJasper following Semver spec, alpha.3.2 is less/lower then nightly.1.

[...] identifiers with letters or hyphens are compared lexically in ASCII sort order [...]

https://semver.npmjs.com/ seems to deviate from spec here, but npm i/yarn add seem to resolve differently.
I agree that this is at least inconsistent.

@Xiphe it's fixed in the nightly's, I agree it will only be fixed once we release an alpha but that would happen anyway in a couple days/weeks.

Not sure when we'll release a next alpha, probably once we figure out some more stability issues. They usually come with a twitter post with all the added features and some testing to see if it's reliable enough so they're a bit more work to release than a nightly, especially as we've had some stuff get merged into v2 since the last alpha (aka we can't really do a minor alpha release).

alright! thanks for the update

Was this page helpful?
0 / 5 - 0 ratings