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

fix: remove BUNDLED_NODE_VERSION file #14

Merged
merged 3 commits into from
Jul 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ jobs:
D:\.pnpm-store
./bin/node
./bin/node.exe
key: "cache-OS:${{ matrix.os }}-${{ matrix.node_arch }}-node:${{ matrix.node_version }}-${{ hashFiles('./package.json') }}-${{ hashFiles('BUNDLED_NODE_VERSION') }}"
key: "cache-OS:${{ matrix.os }}-${{ matrix.node_arch }}-node:${{ matrix.node_version }}-${{ hashFiles('./package.json') }}-${{ hashFiles('./.npmrc') }}"

- name: Install Node
uses: actions/setup-node@v2
@@ -74,7 +74,9 @@ jobs:
uses: wagoid/commitlint-github-action@v2

- name: Install dependencies
run: npm install
run: |
npm install --ignore-scripts # native modules are not used here
npm run prepare

- name: Format ✨
run: npm run test.format
1 change: 0 additions & 1 deletion BUNDLED_NODE_VERSION

This file was deleted.

20 changes: 20 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const nodeTarget = require("fs")
.readFileSync("./.npmrc", "utf8")
.match(/target=(.*)\n/)[1]

module.exports = {
presets: [
[
"babel-preset-atomic",
{
targets: {
node: nodeTarget,
},
flow: false,
react: false,
},
],
],
exclude: "node_modules/**",
sourceMap: "inline",
}
17 changes: 0 additions & 17 deletions babel.config.json

This file was deleted.

2 changes: 1 addition & 1 deletion script/download-node.js
Original file line number Diff line number Diff line change
@@ -102,7 +102,7 @@ const downloadNode = function (version, done) {
}
}

const versionToInstall = fs.readFileSync(path.resolve(__dirname, "..", "BUNDLED_NODE_VERSION"), "utf8").trim()
const versionToInstall = fs.readFileSync(path.resolve(__dirname, "..", ".npmrc"), "utf8").match(/target=(.*)\n/)[1]
downloadNode(versionToInstall, function (error) {
if (error != null) {
console.error("Failed to download node", error)