Skip to content

Commit

Permalink
Replace babel with @vercel/ncc
Browse files Browse the repository at this point in the history
We want to simplify actions code generation to reduce build times and
complexity. Solution recommended by GitHub documentation is using @vercel/ncc
https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action#commit-tag-and-push-your-action-to-github
We tried it before but for some reason the tool wasn't working well with
our code, so we switched to babel. It turns out that the latest version
of ncc is able to handle our code generation, hence we're switching to
it.

The change let us simplify also linting configuration to have just once
config.
  • Loading branch information
nkuba committed Feb 8, 2022
1 parent e609f35 commit 0e820e2
Show file tree
Hide file tree
Showing 39 changed files with 35,032 additions and 10,553 deletions.
7 changes: 1 addition & 6 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
dist/
node-modules/
actions/notify-workflow-completed/node_modules/
actions/notify-workflow-completed/dist/

# Following directories have their own formatting configuration:
actions/run-workflow/
actions/upstream-builds-query/
15 changes: 0 additions & 15 deletions .eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion actions/run-workflow/.eslintrc.json → .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": ["eslint-config-keep", "prettier"],
"parserOptions": {
"ecmaVersion": 2017,
"ecmaVersion": 13,
"sourceType": "module"
},
"env": {
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/run-workflow.yml

This file was deleted.

23 changes: 4 additions & 19 deletions .github/workflows/upstream-builds-query.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: '12'
node-version: "12"

- name: Calculate hash of committed `dist` directory
run: echo "COMMITTED_HASH=${{ hashFiles('./dist/**') }}" >> $GITHUB_ENV
Expand All @@ -47,21 +47,6 @@ jobs:
echo "RESULT: $RESULT"
exit $RESULT
upstream-builds-query-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false

- uses: actions/setup-node@v2
with:
node-version: '12'

- run: yarn install

- run: yarn run lint

upstream-builds-query-unit-tests:
runs-on: ubuntu-latest
steps:
Expand All @@ -71,7 +56,7 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: '12'
node-version: "12"

- run: yarn install

Expand Down Expand Up @@ -108,8 +93,8 @@ jobs:
]
query: |
keep-core-contracts-version = github.com/keep-network/keep-core/solidity#version
keep-core-version = github.com/keep-network/keep-core#version
keep-core-contracts-version = github.com/keep-network/keep-core/solidity#version
keep-core-version = github.com/keep-network/keep-core#version
# Verify outputs of the previous step.
- name: Validate `keep-core-contracts-version`
Expand Down
4 changes: 2 additions & 2 deletions actions/notify-workflow-completed/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ branding:
icon: "rotate-ccw"

runs:
using: "node12"
main: "dist/main.js"
using: node16
main: "./dist/index.js"
Loading

0 comments on commit 0e820e2

Please sign in to comment.