-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1739 from reduxjs/typescript-port
- Loading branch information
Showing
77 changed files
with
22,841 additions
and
64,999 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,40 @@ | ||
const { NODE_ENV, BABEL_ENV } = process.env | ||
const cjs = NODE_ENV === 'test' || BABEL_ENV === 'commonjs' | ||
const loose = true | ||
|
||
module.exports = { | ||
presets: [['@babel/env', { loose, modules: false }]], | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
esmodules: true, | ||
}, | ||
// Use the equivalent of `babel-preset-modules` | ||
bugfixes: true, | ||
modules: false, | ||
loose: true, | ||
}, | ||
], | ||
'@babel/preset-typescript', | ||
], | ||
plugins: [ | ||
['@babel/proposal-decorators', { legacy: true }], | ||
['@babel/proposal-object-rest-spread', { loose }], | ||
'@babel/transform-react-jsx', | ||
cjs && ['@babel/transform-modules-commonjs', { loose }], | ||
['@babel/plugin-proposal-class-properties', { loose: true }], | ||
['@babel/plugin-proposal-private-methods', { loose: true }], | ||
['@babel/plugin-proposal-private-property-in-object', { loose: true }], | ||
cjs && ['@babel/transform-modules-commonjs'], | ||
[ | ||
'@babel/transform-runtime', | ||
{ | ||
useESModules: !cjs, | ||
version: require('./package.json').dependencies[ | ||
'@babel/runtime' | ||
].replace(/^[^0-9]*/, '') | ||
} | ||
] | ||
].filter(Boolean) | ||
].replace(/^[^0-9]*/, ''), | ||
}, | ||
], | ||
].filter(Boolean), | ||
assumptions: { | ||
enumerableModuleMeta: true, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"sandboxes": ["vanilla", "vanilla-ts"], | ||
"node": "14", | ||
"buildCommand": "build", | ||
"packages": ["."] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
name: `@yarnpkg/plugin-compat`, | ||
factory: (require) => { | ||
// we are not using PNP and want to use `typescript@next` in CI without hassle | ||
// dummy implementation to override the built-in version of this plugin | ||
// can be dropped once we switch to yarn 3 | ||
return {} | ||
}, | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
nodeLinker: node-modules | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs | ||
spec: '@yarnpkg/plugin-workspace-tools' | ||
- path: .yarn/plugins/@yarnpkg/plugin-compat.cjs | ||
spec: '@yarnpkg/plugin-compat' | ||
|
||
yarnPath: .yarn/releases/yarn-berry.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.