Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Node.js 14 support #920

Merged
merged 12 commits into from
Aug 15, 2023
10 changes: 10 additions & 0 deletions lib/dependency-manager-adapters/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const path = require('path');
const debug = require('debug')('ember-try:dependency-manager-adapter:npm');
const rimraf = util.promisify(require('rimraf'));
const chalk = require('chalk');
const semver = require('semver');

module.exports = CoreObject.extend({
init() {
Expand Down Expand Up @@ -202,6 +203,15 @@ module.exports = CoreObject.extend({
delete packageJSON[kindOfDependency][packageName];
} else {
packageJSON[kindOfDependency][packageName] = version;

// in npm we need to always add an override if the version is a pre-release
mansona marked this conversation as resolved.
Show resolved Hide resolved
if (semver.prerelease(version) || /^https*:\/\/.*\.tg*z/.test(version)) {
if (!packageJSON.overrides) {
packageJSON.overrides = {};
}

packageJSON.overrides[packageName] = `$${packageName}`;
mansona marked this conversation as resolved.
Show resolved Hide resolved
}
}
});
},
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"fs-extra": "^6.0.1",
"resolve": "^1.20.0",
"rimraf": "^3.0.2",
"semver": "^7.5.4",
"walk-sync": "^2.2.0"
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions smoke-test-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions smoke-test-app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4195,6 +4195,7 @@ ember-try@../:
fs-extra "^6.0.1"
resolve "^1.20.0"
rimraf "^3.0.2"
semver "^7.5.4"
walk-sync "^2.2.0"

emoji-regex@^8.0.0:
Expand Down
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7036,6 +7036,13 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.2.0, semver@^6.3.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==

semver@^7.5.4:
version "7.5.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
dependencies:
lru-cache "^6.0.0"

[email protected]:
version "0.17.1"
resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
Expand Down
Loading