diff --git a/CHANGELOG.md b/CHANGELOG.md index 17fb7c962..abe9b6b7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,11 @@ **_Add new changes here as they land_** -## 0.6 () +## 0.6.1 (2022-01-29) + +- Fix postInstall script (#1577) + +## 0.6 (2022-01-28) - React 18 - Leverage new React 18 APIs for improved safety and optimizations. (#1488) @@ -28,11 +32,10 @@ - Fix transitive selector refresh for some cases (#1409) - Fix some corner cases with async selectors and multiple stores (#1568) - Atom Effects - - Run atom effects when atoms are initialized from a set during a transaction from `useRecoilTransaction_UNSTABLE()` (#1466) + - Run atom effects when atoms are initialized from a set during a transaction from `useRecoilTransaction_UNSTABLE()` (#1466, #1569) - Atom effects are cleaned up when initialized by a Snapshot which is released. (#1511, #1532) - Unsubscribe `onSet()` handlers in atom effects when atoms are cleaned up. (#1509) - Call `onSet()` when atoms are initialized with `` (#1519, #1511) - - Set `trigger` to `'set'` when initialized from a set in a Recoil transaction. (#1569) - Avoid extra re-renders in some cases when a component uses a different atom/selector. (#825) - `` will only call `initializeState()` once during the initial render. (#1372) - Lazily compute the properties of `useGetRecoilValueInfo_UNSTABLE()` and `Snapshot#getInfo_UNSTABLE()` results (#1549) diff --git a/package.json b/package.json index 6f4815352..e72dd59f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "recoil", - "version": "0.6.0", + "version": "0.6.1", "description": "Recoil - A state management library for React", "main": "cjs/recoil.js", "module": "es/recoil.js", @@ -17,7 +17,6 @@ "license": "MIT", "scripts": { "prepare": "install-peers", - "postinstall": "cd ./node_modules/gen-flow-files && yarn install && yarn build", "build": "rollup -c && node scripts/postbuild.js", "test": "jest packages/*", "format": "prettier --write \"./**/*.{js,md,json}\"", diff --git a/scripts/postbuild.js b/scripts/postbuild.js index b0bf7f26f..77720a5d6 100644 --- a/scripts/postbuild.js +++ b/scripts/postbuild.js @@ -23,7 +23,10 @@ console.log('Copying index.d.ts for TypeScript support...'); fs.copyFile('./typescript/index.d.ts', './index.d.ts', logErrors); console.log('Generating Flow type files...'); -exec('npx gen-flow-files packages/recoil --out-dir cjs', err => { - logErrors(err); - fs.rename('cjs/Recoil_index.js.flow', 'cjs/recoil.js.flow', logErrors); -}); +exec( + 'cd ./node_modules/gen-flow-files && yarn install && yarn build && cd ../.. && npx gen-flow-files packages/recoil --out-dir cjs', + err => { + logErrors(err); + fs.rename('cjs/Recoil_index.js.flow', 'cjs/recoil.js.flow', logErrors); + }, +);