Skip to content

Commit

Permalink
chore: move to preconstruct & changesets (#1379)
Browse files Browse the repository at this point in the history
* chore: move to preconstruct

* chore: use enum for TransitionPhase

* chore: clean overload types

* chore: fix tsconfig to include targets

* chore: add alloc/types back

* chore: remove .bic_cache files

* chore: add class-properties support for babel

* chore: remove devDependencies from packages

* chore: retriggering codesandbox ci with useless comment

* Revert "chore: remove devDependencies from packages"

This reverts commit 3c2dcb4.

* chore: reclean deps

* chore: update yarn.lock

* chore: re-removing devDependencies

* Revert "chore: re-removing devDependencies"

This reverts commit 278c385.

* chore: remove react-spring from deps

* chore: add js files back in

* chore: fix class super property bug

* chore: fix tests

* fix: final test

* refactor: remove eslint

lets do it in another commit and use the same one in drei / r3f etc.

* fix: type tests

* chore: add changesets

* chore: add changelog

* chore: set tidled versions of package for changesets to bump

* chore: add licenses and update packages for npm

* chore: add new scripts for releasing

* chore: add nested CHANGELOG to gitignore

* chore: remove old slow scripts

* chore: remove recrawl

resolves #1459

* chore: remove docs we dont need

* chore: update CONTRIBUTING

* chore: tweak config

Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
  • Loading branch information
dbismut and joshuaellis committed Apr 27, 2021
1 parent 9568020 commit c1b9e80
Show file tree
Hide file tree
Showing 78 changed files with 3,742 additions and 7,579 deletions.
10 changes: 10 additions & 0 deletions .changeset/config.json
@@ -0,0 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.6.0/schema.json",
"changelog": false,
"commit": true,
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "minor",
"ignore": []
}
20 changes: 20 additions & 0 deletions .changeset/pre.json
@@ -0,0 +1,20 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"demo": "1.0.0",
"@react-spring/animated": "9.1.2",
"@react-spring/core": "9.1.2",
"@react-spring/parallax": "9.1.2",
"react-spring": "9.1.2",
"@react-spring/shared": "9.1.2",
"@react-spring/types": "9.1.2",
"@react-spring/konva": "9.1.2",
"@react-spring/native": "9.1.2",
"@react-spring/three": "9.1.2",
"@react-spring/three-v5": "9.1.2",
"@react-spring/web": "9.1.2",
"@react-spring/zdog": "9.1.2"
},
"changesets": []
}
33 changes: 23 additions & 10 deletions .gitignore
@@ -1,16 +1,29 @@
dist/
.bic_cache
.rpt2_cache/
node_modules/
coverage/
# production
build/
dist/
.cache/
.parcel-cache/

# testing
/coverage

# misc
.DS_Store
Thumbs.db
ehthumbs.db
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*


Desktop.ini
$RECYCLE.BIN/
.DS_Store
package-lock.json
report.*.json
.idea
*.log
/docs/
/examples/

**/CHANGELOG.md
10 changes: 3 additions & 7 deletions .vscode/react-spring.code-workspace
Expand Up @@ -9,19 +9,15 @@
"path": "../packages"
},
{
"name": "examples",
"path": "../examples"
"name": "demo",
"path": "../demo"
},
{
"name": "docs",
"path": "../docs"
}
],
"settings": {
"typescript.tsdk": "node_modules/typescript/lib",
"files.exclude": {
"**/.bic_cache": true,
"**/.rpt2_cache": true
}
"typescript.tsdk": "node_modules/typescript/lib"
}
}
6 changes: 1 addition & 5 deletions .vscode/settings.json
@@ -1,7 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"files.exclude": {
"**/.bic_cache": true,
"**/.rpt2_cache": true
}
"typescript.tsdk": "node_modules/typescript/lib"
}
69 changes: 41 additions & 28 deletions CONTRIBUTING.md
Expand Up @@ -9,33 +9,9 @@ cd react-spring

2. Install `yarn` (https://yarnpkg.com/en/docs/install)

3. Bootstrap the packages:
3. Preconstuct will link the packages up in a postinstall funciton

```sh
yarn

# Clone the docs (optional)
yarn meta git update
```

4. Link the packages:

```sh
# Use the .js bundles
yarn lerna exec 'cd dist && yarn link || exit 0'

# Or use the uncompiled .ts packages
yarn lerna exec 'yarn link'
```

5. Link `react-spring` to your project:

```sh
cd ~/my-project
yarn link react-spring
```

6. Let's get cooking! 👨🏻‍🍳🥓
4. Let's get cooking! 👨🏻‍🍳🥓

## Guidelines

Expand Down Expand Up @@ -69,8 +45,45 @@ React 16.8+ has global state to support its "hooks" feature, so you need to ensu

# Publishing

To publish a new version:
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
```
yarn release major | minor | patch --tag

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
```
19 changes: 19 additions & 0 deletions babel.config.js
@@ -0,0 +1,19 @@
module.exports = {
comments: false,
presets: [
[
'@babel/preset-env',
{
bugfixes: true,
loose: true,
shippedProposals: true,
targets: {
// check this later
esmodules: true,
},
},
],
'@babel/preset-react',
'@babel/preset-typescript',
],
}
5 changes: 0 additions & 5 deletions demo/.gitignore

This file was deleted.

6 changes: 3 additions & 3 deletions demo/package.json
@@ -1,11 +1,11 @@
{
"name": "demo-react-spring-sandbox",
"name": "demo",
"version": "1.0.0",
"description": "a sandbox for react-spring (probably will be replaced with something in the future)",
"main": "null",
"author": "Josh Ellis",
"license": "MIT",
"private": false,
"private": true,
"scripts": {
"dev": "vite",
"serve": "vite preview"
Expand All @@ -31,7 +31,7 @@
"@types/styled-components": "^5.1.9",
"@vitejs/plugin-react-refresh": "^1.3.1",
"typescript": "^4.2.3",
"vite": "^2.1.2"
"vite": "2.0.5"
},
"bic": false
}
5 changes: 1 addition & 4 deletions demo/tsconfig.json
Expand Up @@ -14,10 +14,7 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react",
"paths": {
"@react-spring/web": ["../targets/web/src/index.ts"]
}
"jsx": "react"
},
"include": ["./src"]
}

0 comments on commit c1b9e80

Please sign in to comment.