Skip to content

Commit

Permalink
Merge pull request #1594 from embroider-build/remove-volta
Browse files Browse the repository at this point in the history
remove volta from CI
  • Loading branch information
ef4 committed Oct 31, 2023
2 parents 20d0348 + c16b1a0 commit 518ea37
Show file tree
Hide file tree
Showing 25 changed files with 33 additions and 101 deletions.
22 changes: 10 additions & 12 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,17 @@ inputs:
runs:
using: 'composite'
steps:
- uses: volta-cli/action@v4
env:
ACTIONS_STEP_DEBUG: truex
- name: Get pnpm cache directory path
id: pnpm-cache-dir-path
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: remove pinned node version
run: echo "auto-install-peers=false" > .npmrc
shell: bash
- uses: actions/cache@v3
id: pnpm-cache
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
path: ${{ steps.pnpm-cache-dir-path.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}-v1
restore-keys: |
${{ runner.os }}-pnpm-
version: 8
run_install: false
- uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
- run: pnpm install ${{ fromJSON('{"false":"--no-lockfile", "true":"--frozen-lockfile"}')[inputs.use_lockfile] }}
shell: bash
3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
auto-install-peers=false
auto-install-peers=false
use-node-version=16.20.0
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"volta": {
"node": "16.20.0",
"pnpm": "8.9.2"
},
"changelog": {
"__comment__": "Our release infrastructure relies on these exact labels. Be careful changing them.",
"labels": {
Expand Down
3 changes: 0 additions & 3 deletions packages/addon-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,5 @@
},
"engines": {
"node": "12.* || 14.* || >= 16"
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 0 additions & 3 deletions packages/addon-shim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,5 @@
},
"engines": {
"node": "12.* || 14.* || >= 16"
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 0 additions & 3 deletions packages/babel-loader-9/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,5 @@
},
"engines": {
"node": "12.* || 14.* || >= 16"
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 0 additions & 3 deletions packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,5 @@
},
"engines": {
"node": "12.* || 14.* || >= 16"
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 0 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,5 @@
},
"engines": {
"node": "12.* || 14.* || >= 16"
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 0 additions & 3 deletions packages/hbs-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,5 @@
},
"engines": {
"node": "12.* || 14.* || >= 16"
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 0 additions & 3 deletions packages/macros/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,5 @@
},
"ember-addon": {
"main": "src/ember-addon-main.js"
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 0 additions & 3 deletions packages/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,5 @@
"dist/*"
]
}
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 0 additions & 3 deletions packages/shared-internals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,5 @@
},
"engines": {
"node": "12.* || 14.* || >= 16"
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 0 additions & 3 deletions packages/test-setup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,5 @@
},
"engines": {
"node": "12.* || 14.* || >= 16"
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 0 additions & 3 deletions packages/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,5 @@
"ember-addon": {
"configPath": "tests/dummy/config",
"main": "addon-main.js"
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 0 additions & 3 deletions packages/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,5 @@
},
"engines": {
"node": "12.* || 14.* || >= 16"
},
"volta": {
"extends": "../../package.json"
}
}
26 changes: 15 additions & 11 deletions pnpm-lock.yaml

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

3 changes: 0 additions & 3 deletions test-packages/release/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,5 @@
"latest-version": "^5.0.0",
"semver": "^7.3.5",
"yargs": "^17.0.1"
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 0 additions & 3 deletions test-packages/sample-transforms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,5 @@
},
"ember-addon": {
"configPath": "tests/dummy/config"
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 0 additions & 3 deletions test-packages/support/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,5 @@
"@types/fs-extra": "^9.0.12",
"@types/lodash": "^4.14.170",
"@types/node": "^10.5.2"
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 0 additions & 3 deletions test-packages/unstable-release/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
"fs-extra": "^9.1.0",
"globby": "^11.0.3"
},
"volta": {
"extends": "../../package.json"
},
"devDependencies": {
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.5.0",
Expand Down
4 changes: 0 additions & 4 deletions tests/app-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,5 @@
},
"ember": {
"edition": "octane"
},
"volta": {
"node": "16.20.0",
"pnpm": "8.9.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@
},
"devDependencies": {
"ember-engines": "*"
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 0 additions & 3 deletions tests/scenarios/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,5 @@
"execa": "^5.1.1",
"tslib": "^2.6.0",
"typescript": "^5.1.6"
},
"volta": {
"extends": "../../package.json"
}
}
17 changes: 4 additions & 13 deletions tests/scenarios/shared-internals-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,25 @@ const { module: Qmodule, test } = QUnit;

Scenarios.fromProject(() => new Project('shared-internals-tests'))
.map('shared-internals', project => {
project.pkg.volta = {
node: '12.22.1',
};
project.linkDependency('@embroider/shared-internals', { baseDir: __dirname });
project.linkDependency('qunit', { baseDir: __dirname });
project.linkDependency('semver', { baseDir: __dirname });

project.mergeFiles({
'.npmrc': 'use-node-version=12.22.1',
'test.js': `
const { module: QModule, test } = require("qunit");
const semver = require("semver");
const { PackageCache } = require("@embroider/shared-internals");
QModule("shared-internals", function () {
test("testing on node 12", function (assert) {
assert.ok(
semver.satisfies(process.version, "^12.0.0"),
\`\${process.version} should be what we expected\`
);
});
test("smoke test", async function (assert) {
let pk = PackageCache.shared("my-test", __dirname);
assert.equal(pk.get(__dirname).name, "shared-internals-tests");
Expand All @@ -39,14 +37,7 @@ Scenarios.fromProject(() => new Project('shared-internals-tests'))
test('run tests', async function (assert) {
let app = await scenario.prepare();

// if we just try to invoke node directly in a child process, our own
// volta settings dominate over the test app's
let tryit = await app.execute('volta which node');
if (tryit.exitCode !== 0) {
throw new Error('unable to locate our node version');
}
let nodebin = tryit.output.trim();
let result = await app.execute(`${nodebin} ./node_modules/qunit/bin/qunit.js ./test.js`);
let result = await app.execute(`pnpm ./node_modules/qunit/bin/qunit.js ./test.js`);
assert.equal(result.exitCode, 0, result.output);
});
});
Expand Down
4 changes: 2 additions & 2 deletions tests/ts-app-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"@embroider/test-setup": "workspace:*",
"@embroider/webpack": "workspace:*",
"@glimmer/component": "^1.1.2",
"@glimmer/interfaces": "0.84.2",
"@glimmer/reference": "0.84.2",
"@glimmer/interfaces": "^0.84.2",
"@glimmer/reference": "^0.84.2",
"@glimmer/tracking": "^1.1.2",
"@glint/environment-ember-loose": "^1.1.0",
"@glint/template": "^1.1.0",
Expand Down

0 comments on commit 518ea37

Please sign in to comment.