Skip to content

Commit

Permalink
build: update to ESM (#24)
Browse files Browse the repository at this point in the history
* build: update to ESM

* ci: change node matrix

Co-authored-by: Ludovic Muller <ludovicm67@users.noreply.github.com>

---------

Co-authored-by: Ludovic Muller <ludovicm67@users.noreply.github.com>
  • Loading branch information
tpluscode and ludovicm67 committed Sep 11, 2023
1 parent 6d2f83e commit 204b050
Show file tree
Hide file tree
Showing 15 changed files with 4,687 additions and 4,066 deletions.
5 changes: 5 additions & 0 deletions .changeset/dull-pianos-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"rdf-validate-datatype": minor
---

Update to ESM
6 changes: 6 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": [ "@tpluscode/eslint-config/js" ],
"env": {
"mocha": true
}
}
2 changes: 2 additions & 0 deletions .github/workflows/add-to-backlog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
types:
- opened
pull_request:
branches-ignore:
- "dependabot/**/*"
types:
- opened

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
uses: actions/checkout@v3
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@master
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Install Dependencies
run: npm install --ci
run: npm ci

- name: Create Release Pull Request
uses: changesets/action@v1
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['10', '12', '14']
node: ['16', '18', '20']
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm run test-ci
- run: npx c8 --reporter lcovonly --reporter text npm test
- uses: codecov/codecov-action@v1

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: npm ci
- run: npm run lint
12 changes: 3 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
const validators = require('./src/validators')
const validateTerm = require('./src/validate-term')
const validateQuad = require('./src/validate-quad')

module.exports = {
validators,
validateTerm,
validateQuad
}
export { validators } from './src/validators.js'
export { validateTerm } from './src/validate-term.js'
export { validateQuad } from './src/validate-quad.js'
Loading

0 comments on commit 204b050

Please sign in to comment.