Skip to content

Commit

Permalink
Merge pull request #3122 from jspsych/update-config-package
Browse files Browse the repository at this point in the history
Update `@jspsych/config` dependencies
  • Loading branch information
bjoluc authored Nov 10, 2023
2 parents cd53e7e + 220f4e3 commit 76fca27
Show file tree
Hide file tree
Showing 12 changed files with 4,882 additions and 16,854 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-donuts-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@jspsych/config": patch
---

Remove erroneous browser builds from the rollup configuration returned by `makeNodeRollupConfig()`
9 changes: 9 additions & 0 deletions .changeset/lovely-cobras-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@jspsych/config": major
---

Upgrade build tools to their latest versions. This doesn't introduce breaking changes to the artifacts built using `@jspsych/config`, but it requires some minor changes to projects using `@jspsych/config`:

- The minimum required Node.js version is now 18.0.0
- Jest has been upgraded from v28 to v29 and ts-jest has been replaced with the more performant Sucrase Jest plugin to avoid significant memory leaks. As a consequence, Jest does no longer type-check code. If you are facing any issues, please check Jest's [upgrade guide](https://jestjs.io/docs/upgrading-to-jest29) for instructions on updating your tests.
- TypeScript has been upgraded from version 4 to version 5. This is very unlikely to break anything in your code though.
20 changes: 5 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,23 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16]
node: [18, 20]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm

- name: Install npm@v7
run: npm install -g npm@7

- name: Install dependencies
run: npm ci

# Running this after `npm ci` because `npm ci` removes `node_modules`:
# Running this after `npm ci` because `npm ci` removes `node_modules`:
- name: Download Turborepo cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: node_modules/.cache/turbo
key: ${{ runner.os }}-node-${{ matrix.node }}-turbo-${{ hashFiles('node_modules/.cache/turbo') }}
Expand All @@ -38,14 +35,7 @@ jobs:
- name: Build packages
run: npm run build

# TODO setup linting
# - name: Lint
# run: npm run lint

- name: Run tests
run: npm run test -- --ci --coverage --maxWorkers=2
env:
NODE_OPTIONS: "--max-old-space-size=4096" # Increase heap size for jest
# TODO setup codecov or coveralls
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v1
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node.js 16
uses: actions/setup-node@v2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci

- name: Download Turborepo cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: node_modules/.cache/turbo
key: ${{ runner.os }}-node-16-turbo-${{ hashFiles('node_modules/.cache/turbo') }}
key: ${{ runner.os }}-node-20-turbo-${{ hashFiles('node_modules/.cache/turbo') }}
restore-keys: |
${{ runner.os }}-node-16-turbo-
${{ runner.os }}-node-20-turbo-
- name: Run tests
run: npm run test -- --ci --maxWorkers=2
Expand Down
Loading

0 comments on commit 76fca27

Please sign in to comment.