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
42 changes: 22 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16

- run: yarn install
- run: yarn lint
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 16.x
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
Expand All @@ -51,7 +51,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 16.x
cache: yarn
- name: Install Dependencies
run: yarn install --no-lockfile
Expand Down Expand Up @@ -85,9 +85,9 @@ jobs:
- ./node_modules/.bin/ember try:each --config-path='../test/fixtures/dummy-ember-try-config.js' --skip-cleanup true

# try:ember
- ./node_modules/.bin/ember try:ember '> 3.28.0 < 4.2.0'
- ./node_modules/.bin/ember try:ember '4.1.0' --config-path='../test/fixtures/dummy-ember-try-config.js'
- ./node_modules/.bin/ember try:ember '4.2.0' --skip-cleanup=true
- ./node_modules/.bin/ember try:ember '> 4.10.0 < 5.2.0'
- ./node_modules/.bin/ember try:ember '4.9.0' --config-path='../test/fixtures/dummy-ember-try-config.js'
- ./node_modules/.bin/ember try:ember '4.8.3' --skip-cleanup=true

# try:config
- ./node_modules/.bin/ember try:config
Expand Down Expand Up @@ -132,10 +132,10 @@ jobs:
- ./node_modules/.bin/ember try:each --config-path='../test/fixtures/dummy-ember-try-config-fs-extra-scenarios.js'

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16

- name: install deps
run: yarn install
Expand All @@ -150,8 +150,9 @@ jobs:

npm-smoke-tests:
strategy:
fail-fast: false
matrix:
node: ['14', '16', '18']
node: ['16', '18']

name: Smoke Tests (Node v${{ matrix.node }} with npm)
runs-on: ubuntu-latest
Expand All @@ -162,8 +163,8 @@ jobs:
- test

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

Expand All @@ -177,8 +178,9 @@ jobs:

yarn-smoke-tests:
strategy:
fail-fast: false
matrix:
node: ['14', '16', '18']
node: ['16', '18']

name: Smoke Tests (Node v${{ matrix.node }} with yarn)
runs-on: ubuntu-latest
Expand All @@ -189,8 +191,8 @@ jobs:
- test

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

Expand All @@ -212,10 +214,10 @@ jobs:
- test

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16

- name: install deps
run: yarn install
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- uses: actions/setup-node@v1
with:
registry-url: 'https://registry.npmjs.org'
node-version: 16

- name: auto-dist-tag
run: npx auto-dist-tag@1 --write
Expand Down
13 changes: 13 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,18 @@ 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 (
!this.useYarnCommand &&
(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
3 changes: 2 additions & 1 deletion 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 All @@ -60,7 +61,7 @@
"tmp-sync": "^1.1.0"
},
"engines": {
"node": "14.* || 16.* || >= 18.*"
"node": "16.* || >= 18.*"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand Down
Loading