Skip to content

Commit

Permalink
Migrate @shared to recoil-shared (#1437)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebookexperimental/Recoil#1437

Migrate OSS imports referencing `shared` to use `recoil-shared`

Reviewed By: habond

Differential Revision: D32520696

fbshipit-source-id: d8c3e86fbd8d087bccbdf9ee5cb8f9696f02c0b5
  • Loading branch information
drarmstr authored and facebook-github-bot committed Dec 1, 2021
1 parent 4ccab8a commit 88a69fe
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .flowconfig
Expand Up @@ -23,8 +23,6 @@ module.name_mapper='ReactTestUtils' -> '<PROJECT_ROOT>/node_modules/react-dom/te
module.name_mapper='Recoil' -> '<PROJECT_ROOT>/packages/recoil'
module.name_mapper='recoil-sync' -> '<PROJECT_ROOT>/packages/recoil-syync'
module.name_mapper='refine' -> '<PROJECT_ROOT>/packages/refine'

module.name_mapper='@shared' -> '<PROJECT_ROOT>/packages/shared'
module.name_mapper='recoil-shared' -> '<PROJECT_ROOT>/packages/shared'

exact_by_default=true
Expand Down
1 change: 0 additions & 1 deletion jest.config.js
Expand Up @@ -15,7 +15,6 @@ module.exports = {
__DEV__: true,
},
moduleNameMapper: {
'^@shared(.*)$': '<rootDir>/packages/shared$1',
'^recoil-shared(.*)$': '<rootDir>/packages/shared$1',
'^Recoil$': '<rootDir>/packages/recoil',
'^recoil-sync$': '<rootDir>/packages/recoil-sync',
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/util/Recoil_ReactBatchedUpdates.js
Expand Up @@ -15,6 +15,6 @@
// @fb-only: const {unstable_batchedUpdates} = require('ReactDOMComet');

// prettier-ignore
const {unstable_batchedUpdates} = require('@shared/polyfill/ReactBatchedUpdates'); // @oss-only
const {unstable_batchedUpdates} = require('recoil-shared/polyfill/ReactBatchedUpdates'); // @oss-only

module.exports = {unstable_batchedUpdates};
2 changes: 1 addition & 1 deletion packages/shared/util/Recoil_err.js
Expand Up @@ -12,6 +12,6 @@

// @fb-only: const {err} = require('fb-error');

const err = require('@shared/polyfill/err.js'); // @oss-only
const err = require('recoil-shared/polyfill/err.js'); // @oss-only

module.exports = err;
2 changes: 1 addition & 1 deletion packages/shared/util/Recoil_expectationViolation.js
Expand Up @@ -12,6 +12,6 @@

// @fb-only: const expectationViolation = require('expectationViolation');

const expectationViolation = require('@shared/polyfill/expectationViolation.js'); // @oss-only
const expectationViolation = require('recoil-shared/polyfill/expectationViolation.js'); // @oss-only

module.exports = expectationViolation;
2 changes: 1 addition & 1 deletion packages/shared/util/Recoil_invariant.js
Expand Up @@ -13,6 +13,6 @@

// @fb-only: const invariant = require('invariant');

const invariant = require('@shared/polyfill/invariant.js'); // @oss-only
const invariant = require('recoil-shared/polyfill/invariant.js'); // @oss-only

module.exports = invariant;
2 changes: 1 addition & 1 deletion packages/shared/util/Recoil_recoverableViolation.js
Expand Up @@ -13,6 +13,6 @@

// @fb-only: const recoverableViolation = require('recoverableViolation');

const recoverableViolation = require('@shared/polyfill/recoverableViolation.js'); // @oss-only
const recoverableViolation = require('recoil-shared/polyfill/recoverableViolation.js'); // @oss-only

module.exports = recoverableViolation;
4 changes: 0 additions & 4 deletions rollup.config.js
Expand Up @@ -42,10 +42,6 @@ const commonPlugins = [
},
alias({
entries: [
{
find: '@shared',
replacement: path.resolve(projectRootDir, 'packages/shared'),
},
{
find: 'recoil-shared',
replacement: path.resolve(projectRootDir, 'packages/shared'),
Expand Down

0 comments on commit 88a69fe

Please sign in to comment.