Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update node.js to v22 #2339

Open
wants to merge 12 commits into
base: next
Choose a base branch
from
11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/publish-ci/cra5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"workerDirectory": "public"
},
"devDependencies": {
"@types/node": "20.16.11",
"@types/node": "22.10.2",
"@types/react": "18.3.11",
"@types/react-dom": "18.3.1",
"typescript": "4.9.5"
Expand Down
7,742 changes: 3,871 additions & 3,871 deletions .github/publish-ci/cra5/yarn.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/publish-ci/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"react-dom": "18.3.1"
},
"devDependencies": {
"@types/node": "20.16.11",
"@types/node": "22.10.2",
"@types/react": "18.3.11",
"@types/react-dom": "18.3.1",
"typescript": "4.9.5"
Expand Down
192 changes: 96 additions & 96 deletions .github/publish-ci/next/yarn.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/publish-ci/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"react-dom": "18.3.1"
},
"devDependencies": {
"@types/node": "20.16.11",
"@types/node": "22.10.2",
"@types/react": "18.3.11",
"@types/react-dom": "18.3.1",
"@vitejs/plugin-react": "4.3.2",
Expand Down
1,004 changes: 502 additions & 502 deletions .github/publish-ci/vite/yarn.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .github/workflows/bundle-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Bundle-size
on:
pull_request:
branches:
- main
- next

env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
Expand Down Expand Up @@ -31,7 +31,7 @@ jobs:
run: yarn install --immutable

- name: Build packages
run: yarn build --filter=!@react-spring/doc
run: yarn build --filter=!@react-spring/docs

- uses: preactjs/compressed-size-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Checks
on:
push:
branches:
- 'main'
- next
pull_request: {}

env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: yarn install --immutable

- name: Build
run: yarn build-ci
run: yarn build:ci

- run: ./scripts/version-and-publish.sh
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:

- name: Build
if: steps.version.outputs.NEXT_VERSION
run: yarn build-ci
run: yarn build:ci

- name: Setup npmrc
if: steps.version.outputs.NEXT_VERSION
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Release Please

on:
push:
branches:
- main

permissions:
contents: read
pull-requests: write

env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}

# Publish to NPM on new releases
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.releases_created }}

- uses: actions/setup-node@v4
if: ${{ steps.release.outputs.releases_created }}
with:
cache: yarn
node-version: '20.x'

- name: Setup npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_PUBLISH_TOKEN }}" > .npmrc

- name: Install
if: ${{ steps.release.outputs.releases_created }}
run: yarn install --immutable

- name: Build
if: ${{ steps.release.outputs.releases_created }}
run: yarn build:ci

# Release Please has already incremented versions and published tags, so we just
# need to publish all unpublished versions to NPM here
- run: yarn workspaces foreach --all --parallel --no-private npm publish --access=public
if: ${{ steps.release.outputs.releases_created }}
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Tests
on:
push:
branches:
- 'main'
- next
pull_request: {}

env:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
run: yarn install --immutable

- name: Build
run: yarn build-ci --filter=!@react-spring/docs
run: yarn build:ci

- name: Pack
run: yarn package
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
run: yarn install --immutable

- name: Build
run: yarn build-ci
run: yarn build:ci

- name: Test
run: yarn test:unit
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
run: yarn add typescript@${{ matrix.ts }}

- name: Build
run: yarn build-ci
run: yarn build:ci

- name: Test
run: |
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
# run: yarn install --immutable

# - name: Build
# run: yarn build-ci
# run: yarn build:ci

# - name: Test
# run: yarn test:e2e
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/validate-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Validate PR"

on:
pull_request:

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.18.0
22.12.0
14 changes: 14 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"packages/animated": "9.7.5",
"packages/core": "9.7.5",
"packages/parallax": "9.7.5",
"packages/rafz": "9.7.5",
"packages/react-spring": "9.7.5",
"packages/shared": "9.7.5",
"packages/types": "9.7.5",
"targets/konva": "9.7.5",
"targets/native": "9.7.5",
"targets/three": "9.7.5",
"targets/web": "9.7.5",
"targets/zdog": "9.7.5"
}
363 changes: 0 additions & 363 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

875 changes: 0 additions & 875 deletions .yarn/releases/yarn-3.8.5.cjs

This file was deleted.

934 changes: 934 additions & 0 deletions .yarn/releases/yarn-4.5.3.cjs

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'
yarnPath: .yarn/releases/yarn-4.5.3.cjs

yarnPath: .yarn/releases/yarn-3.8.5.cjs
npmPublishRegistry: 'https://registry.npmjs.org'
71 changes: 0 additions & 71 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,74 +20,3 @@ Be sure your commit messages follow this specification: https://www.conventional
### Windows permission errors

Some Windows users may need to [enable developer mode](https://howtogeek.com/292914/what-is-developer-mode-in-windows-10) if experiencing `EPERM: operation not permitted, symlink` with Preconstruct. If this persists, you might be running on an unsupported drive/format. In which case, consider using [Docker](https://docs.docker.com/docker-for-windows).

### Duplicate `react` errors

React 16.8+ has global state to support its "hooks" feature, so you need to ensure only one copy of `react` exists in your program. Otherwise, you'll most likely see [this error](https://reactjs.org/warnings/invalid-hook-call-warning.html). Please try the following solutions, and let us know if it still doesn't work for you.

- **For `create-react-app` users:** Follow this guide: https://github.com/facebook/react/issues/13991#issuecomment-496383268

- **For `webpack` users:** Add an alias to `webpack.config.js` like this:

```js
alias: {
react: path.resolve('node_modules/react'),
}
```

- **For `gatsby` users:** Install `gatsby-plugin-alias-imports` and add this to your `gatsby-config.js` module:
```js
{
resolve: `gatsby-plugin-alias-imports`,
options: {
alias: {
react: path.resolve('node_modules/react'),
},
},
},
```

# Publishing

We use [`changesets`](https://github.com/atlassian/changesets) to publish our package now.
All our dependencies are fixed using ~ after [1414](https://github.com/pmndrs/react-spring/issues/1414) but luckily changesets will bump them for every minor version we release.

## Simple release

You want to release some new features that haven't been released yet:

```shell
yarn changeset:add
```

Follow the prompt to flag which packages need to update although with `react-spring` we keep all our packages at the same version.

Then you'll run:

```shell
yarn vers
```

This will update all the packages correctly according to what version you just set with the `add` script & possibly update the deps within those packages.

Finally:

```shell
yarn release
```

This will build the packages, publish them & push the tags to github to signify a new release. Please then update the `releases` on github & the changelog on `react-spring.io`

## Prerelease

Everything above applies but you must first run:

```shell
yarn changeset pre enter beta | alpha | next
```

If you find you're stuck in a prerelease and trying to do a Simple Release, try running:

```shell
yarn changeset pre exit
```
2 changes: 1 addition & 1 deletion docs/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.20.4
22.12.0
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
]
},
"scripts": {
"build-ci": "turbo run build --filter=!@react-spring/doc",
"build:ci": "turbo run build --filter=!@react-spring/docs",
"build": "turbo run build",
"changeset": "changeset",
"clean": "turbo run clean",
Expand All @@ -48,9 +48,7 @@
"test:unit": "jest",
"test:cov": "jest --coverage",
"test:ts": "tsc --noEmit",
"test:e2e": "start-server-and-test 'yarn vite serve packages/parallax/test --host' http-get://localhost:3000 'yarn cypress run'",
"release": "yarn clean && yarn && yarn build && yarn test:ts && yarn test:unit && yarn changeset publish --no-git-tag",
"vers": "yarn changeset version"
"test:e2e": "start-server-and-test 'yarn vite serve packages/parallax/test --host' http-get://localhost:3000 'yarn cypress run'"
},
"commitlint": {
"extends": [
Expand All @@ -63,7 +61,6 @@
}
},
"devDependencies": {
"@changesets/cli": "2.27.9",
"@commitlint/cli": "19.5.0",
"@commitlint/config-conventional": "19.5.0",
"@react-three/fiber": "8.17.10",
Expand Down Expand Up @@ -116,5 +113,5 @@
"type": "opencollective",
"url": "https://opencollective.com/react-spring"
},
"packageManager": "yarn@3.8.5"
"packageManager": "yarn@4.5.3"
}
14 changes: 7 additions & 7 deletions packages/react-spring/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-spring",
"version": "9.7.4",
"version": "9.7.5",
"module": "./dist/react-spring.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring.modern.d.mts",
Expand Down Expand Up @@ -41,12 +41,12 @@
"Josh Ellis (https://github.com/joshuaellis)"
],
"dependencies": {
"@react-spring/core": "~9.7.4",
"@react-spring/konva": "~9.7.4",
"@react-spring/native": "~9.7.4",
"@react-spring/three": "~9.7.4",
"@react-spring/web": "~9.7.4",
"@react-spring/zdog": "~9.7.4"
"@react-spring/core": "~9.7.5",
"@react-spring/konva": "~9.7.5",
"@react-spring/native": "~9.7.5",
"@react-spring/three": "~9.7.5",
"@react-spring/web": "~9.7.5",
"@react-spring/zdog": "~9.7.5"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
Expand Down
Loading
Loading