Skip to content

Commit

Permalink
Bump to Node 18 and yarn 3
Browse files Browse the repository at this point in the history
* build: remove support for Node.js 14

* build: use yarn 3.4.1

* build: make scripts use yarn

* docs: update CONTRIBUTING.md

* build: enable corepack in ci

Signed-off-by: Wouter Termont <[email protected]>

* build: bump to Node.js 18 and Yarn 4

---------

Signed-off-by: Wouter Termont <[email protected]>
  • Loading branch information
termontwouter authored Nov 30, 2023
1 parent 339930d commit 680c7cb
Show file tree
Hide file tree
Showing 7 changed files with 9,469 additions and 6,633 deletions.
12 changes: 7 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ This page contains several pointers for people that want to contribute to this p

## Setup development environment

This project requires [Node.js](https://nodejs.org/en/) and [Yarn](https://yarnpkg.com/) to be installed.
After that, you can clone and install the project as follows:
Start by cloning this repository.

```bash
$ git clone [email protected]:LinkedSoftwareDependencies/Components.js.git
$ yarn install
```

This project requires [Node.js](https://nodejs.org/en/) `>=18.12` and [Yarn](https://yarnpkg.com/) `>=4` to be installed. Preferable, use the Yarn version provided and managed by Node.js' integrated [CorePack](https://yarnpkg.com/corepack) by running `corepack enable`.

After that, you can install the project by running `yarn install`. This will automatically also run `yarn build`, which you can run again at any time to compile any changed code.

## Continuous integration

Given the critical nature of this project, we require a full (100%) test coverage.
Expand All @@ -19,8 +21,8 @@ These checks are run automatically upon each commit, and via continuous integrat

You can run them manually as follows:
```bash
$ yarn run test
$ yarn run lint
$ yarn test
$ yarn lint
```

## Code architecture
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 20.x
- run: corepack enable
- run: yarn install
- run: yarn run lint

Expand All @@ -22,8 +23,6 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version:
- 14.x
- 16.x
- 18.x
- 20.x
- 21.x
Expand All @@ -32,6 +31,8 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Enable CorePack
run: corepack enable
- name: Ensure line endings are consistent
run: git config --global core.autocrlf input
- name: Check out repository
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ index.d.ts
coverage
.eslintcache
components/*.json
.yarn/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,22 @@
],
"author": "Ruben Taelman <[email protected]>",
"license": "MIT",
"packageManager": "[email protected]",
"engines": {
"node": ">=14"
"node": ">=18.12"
},
"scripts": {
"test": "npm run test:jest && npm run test:webpack",
"test:jest": "jest ${1}",
"test:webpack": "npm run test:webpack:node && npm run test:webpack:web",
"test": "yarn test:jest && yarn test:webpack",
"test:jest": "jest",
"test:webpack": "yarn test:webpack:node && yarn test:webpack:web",
"test:webpack:node": "webpack -c test/webpack/webpack.config.js && node test/webpack/build/test.min.js",
"test:webpack:web": "webpack -c test/webpack/webpack.config-web.js && node test/webpack/build-web/test.min.js",
"test-watch": "jest ${1} --watch",
"test-watch": "jest --watch",
"build": "scopy ./components/context.jsonld ./components/context.json && tsc && chmod +x ./bin/compile-config.js",
"build-watch": "tsc --watch",
"lint": "eslint . --ext .ts --cache",
"validate": "npm ls",
"prepare": "npm run build",
"validate": "yarn info",
"postinstall": "yarn build",
"version": "manual-git-changelog onversion"
},
"dependencies": {
Expand Down
Loading

0 comments on commit 680c7cb

Please sign in to comment.