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

Fix instances of deprecated folder mapping within exports in package.json #292

Merged
merged 2 commits into from May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/admin-ui-extensions-react/package.json
Expand Up @@ -11,7 +11,7 @@
"import": "./index.mjs",
"require": "./index.js"
},
"./": "./"
"./*": "./*"
},
"license": "MIT",
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/admin-ui-extensions/package.json
Expand Up @@ -11,7 +11,7 @@
"import": "./index.mjs",
"require": "./index.js"
},
"./": "./"
"./*": "./*"
},
"license": "MIT",
"sideEffects": false,
Expand Down
3 changes: 1 addition & 2 deletions packages/checkout-ui-extensions-react/package.json
Expand Up @@ -17,8 +17,7 @@
"esnext": "./index.esnext",
"import": "./index.mjs",
"require": "./index.js"
},
"./": "./"
}
},
"dependencies": {
"@remote-ui/async-subscription": "^2.1.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/checkout-ui-extensions-run/package.json
Expand Up @@ -21,7 +21,7 @@
"import": "./index.mjs",
"require": "./index.js"
},
"./": "./"
"./*": "./*"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For checkout and post-purchase extensions, I believe we actually want to remove this condition altogether. We do not intend for you to be able to deeply import into the package.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this have any side-effects on the other packages in this PR if we make this change? I'm not familiar with how this folder mapping works.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I already have a PR open for publishing new versions of our packages, i'll make the change to the checkout-ui-extensions packages in there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, there's no harm in shipping this before the packages are published since i'll be merging with main anyhow prior to publishing.

I don't have context on the other packages though in this PR. @lemonmade do you feel comfortable approving this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this mapping just determines what files are accessible to importers of the package. Conceivably, removing this could break consumers, if they are importing "deeply" from the package in a way we do not intend. I'm ok with breaking this use case, though.

},
"devDependencies": {
"@types/glob": "^7.1.1",
Expand Down
3 changes: 1 addition & 2 deletions packages/checkout-ui-extensions/package.json
Expand Up @@ -17,8 +17,7 @@
"esnext": "./index.esnext",
"import": "./index.mjs",
"require": "./index.js"
},
"./": "./"
}
},
"dependencies": {
"@remote-ui/async-subscription": "^2.1.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/post-purchase-ui-extensions-react/package.json
Expand Up @@ -18,7 +18,7 @@
"import": "./index.mjs",
"require": "./index.js"
},
"./": "./"
"./*": "./*"
},
"dependencies": {
"@remote-ui/react": "^4.1.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/post-purchase-ui-extensions/package.json
Expand Up @@ -18,7 +18,7 @@
"import": "./index.mjs",
"require": "./index.js"
},
"./": "./"
"./*": "./*"
},
"dependencies": {
"@remote-ui/core": "^2.1.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/retail-ui-extensions-react/package.json
Expand Up @@ -18,7 +18,7 @@
"import": "./index.mjs",
"require": "./index.js"
},
"./": "./"
"./*": "./*"
},
"dependencies": {
"@remote-ui/react": "^4.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/retail-ui-extensions/package.json
Expand Up @@ -11,7 +11,7 @@
"import": "./index.mjs",
"require": "./index.js"
},
"./": "./"
"./*": "./*"
},
"license": "MIT",
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-extensions-webpack-hot-client/package.json
Expand Up @@ -18,7 +18,7 @@
"import": "./index.mjs",
"require": "./index.js"
},
"./": "./",
"./*": "./*",
"./worker": {
"esnext": "./worker.esnext",
"import": "./worker.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-extensions/package.json
Expand Up @@ -11,7 +11,7 @@
"import": "./index.mjs",
"require": "./index.js"
},
"./": "./"
"./*": "./*"
},
"license": "MIT",
"sideEffects": false,
Expand Down