Skip to content

Commit

Permalink
Merge pull request #23 from hckrnews/commonjs
Browse files Browse the repository at this point in the history
Commonjs
  • Loading branch information
w3nl authored Dec 2, 2022
2 parents a3863ea + f764535 commit 7f27983
Show file tree
Hide file tree
Showing 6 changed files with 6,900 additions and 2,350 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ on: [push]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x, 18.x]
node-version: [14.x, 16.x, "18.10", 19.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: npm install, lint, and test
run: |
npm ci
npm run lint
npm test
env:
CI: true
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: npm install, lint, and test
run: |
npm ci
npm run lint
npm test
npm run build --if-present
env:
CI: true
7 changes: 4 additions & 3 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: "18.10"
- run: npm ci
- run: npm test

Expand All @@ -22,9 +22,10 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: "18.10"
registry-url: https://registry.npmjs.org/
- run: npm ci --production
- run: npm ci
- run: npm run build --if-present
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
37 changes: 18 additions & 19 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,27 @@ on: [push]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
node-version: ["18.10"]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: npm install, lint, and test
run: |
npm ci
npm run lint:report
npm test
env:
CI: true
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: npm install, lint, and test
run: |
npm ci
npm run lint:report
npm test
env:
CI: true
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1 change: 0 additions & 1 deletion babel.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ module.exports = {
},
],
],
plugins: ['@babel/plugin-transform-modules-commonjs'],
};
Loading

0 comments on commit 7f27983

Please sign in to comment.