Skip to content

Commit

Permalink
Merge pull request #920 from SergeAstapov/drop-node-14
Browse files Browse the repository at this point in the history
  • Loading branch information
kategengler authored Aug 15, 2023
2 parents c92dc69 + 54f68f5 commit 9d9763a
Show file tree
Hide file tree
Showing 10 changed files with 18,001 additions and 27,376 deletions.
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
if (
!this.useYarnCommand &&
(semver.prerelease(version) || /^https*:\/\/.*\.tg*z/.test(version))
) {
if (!packageJSON.overrides) {
packageJSON.overrides = {};
}

packageJSON.overrides[packageName] = `$${packageName}`;
}
}
});
},
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

0 comments on commit 9d9763a

Please sign in to comment.