only node > 14 supported

This commit is contained in:
Juan Hernández Serrano 2023-04-11 13:31:59 +02:00
parent e56e214ecf
commit 784aa0e251
4 changed files with 7 additions and 45 deletions

View File

@ -33,7 +33,7 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10.x, 12.x, 14.x, 16.x, 18.x] node-version: [14.x, 16.x, 18.x]
# When set to true, GitHub cancels all in-progress jobs if any matrix job fails. # When set to true, GitHub cancels all in-progress jobs if any matrix job fails.
fail-fast: false fail-fast: false
# The maximum number of jobs that can run simultaneously. Set to 1 if you can't run tests in parallel # The maximum number of jobs that can run simultaneously. Set to 1 if you can't run tests in parallel
@ -49,7 +49,7 @@ jobs:
registry-url: "https://registry.npmjs.org" registry-url: "https://registry.npmjs.org"
- name: install - name: install
run: npm ci run: npm i
- name: node esm tests - name: node esm tests
run: npm run test:node-esm run: npm run test:node-esm

View File

@ -1,40 +0,0 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: publish
on:
workflow_dispatch:
jobs:
publication:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: install
run: npm ci
- name: build
run: npm run build
- name: browser tests
run: npm run test:browser-headless
- name: node tests and coverage
run: npm run coverage
- name: send report to coveralls.io
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@ -58,9 +58,11 @@ function parse () {
process.exit(1) process.exit(1)
} }
let testsGlob = (args.pop() ?? '').replace(/^['"]/, '').replace(/['"]$/, '') // Let us remove surrounding quotes in string (it gives issues in windows) let testsGlob = args.pop()
if (testsGlob === '') { if (testsGlob === undefined) {
testsGlob = '{src/ts/**/*.spec.ts,test/**/*.ts}' testsGlob = '{src/ts/**/*.spec.ts,test/**/*.ts}'
} else {
testsGlob = testsGlob.replace(/^['"]/, '').replace(/['"]$/, '') // Let us remove surrounding quotes in string (it gives issues in windows)
} }
const mochaArgs = [] const mochaArgs = []

View File

@ -22,7 +22,7 @@
}, },
"repository": "github:juanelas/bigint-crypto-utils", "repository": "github:juanelas/bigint-crypto-utils",
"engines": { "engines": {
"node": ">=10.4.0" "node": ">=14.0.0"
}, },
"type": "module", "type": "module",
"main": "./dist/cjs/index.node.cjs", "main": "./dist/cjs/index.node.cjs",