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

refactor(notifications): cleanup notification subpath exports #4650

Merged
merged 2 commits into from
Sep 3, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/notification-services-controller",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Internal subpath exports are using a package.json so this "file path" exists. This is so JS projects are able to resolve the subpath export path (TS projects correctly use the root package.json exports). This pattern was copied from redux-toolkit.

See this comment for more details:
#4604 (comment)

"version": "1.0.0",
"private": true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added this to explicitly set these internal subpath exports to be private.
This shouldn't cause issues with publishing as these are not specified on root of the workspaces file.

If this does cause issues with publishing, I can revert.

"description": "",
"license": "MIT",
"sideEffects": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/notification-services-controller",
"version": "1.0.0",
"private": true,
"description": "",
"license": "MIT",
"sideEffects": false,
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/notification-services-controller",
"version": "1.0.0",
"private": true,
"description": "",
"license": "MIT",
"sideEffects": false,
Expand Down
25 changes: 0 additions & 25 deletions packages/notification-services-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,6 @@
"require": "./dist/NotificationServicesController/index.js",
"types": "./dist/types/NotificationServicesController/index.d.ts"
},
"./notification-services/types": {
"import": "./dist/NotificationServicesController/types/index.mjs",
"require": "./dist/NotificationServicesController/types/index.js",
"types": "./dist/types/NotificationServicesController/types/index.d.ts"
},
"./notification-services/processors": {
"import": "./dist/NotificationServicesController/processors/index.mjs",
"require": "./dist/NotificationServicesController/processors/index.js",
"types": "./dist/types/NotificationServicesController/processors/index.d.ts"
},
"./notification-services/constants": {
"import": "./dist/NotificationServicesController/constants/index.mjs",
"require": "./dist/NotificationServicesController/constants/index.js",
"types": "./dist/types/NotificationServicesController/constants/index.d.ts"
},
"./notification-services/ui": {
"import": "./dist/NotificationServicesController/ui/index.mjs",
"require": "./dist/NotificationServicesController/ui/index.js",
Expand All @@ -57,16 +42,6 @@
"require": "./dist/NotificationServicesPushController/index.js",
"types": "./dist/types/NotificationServicesPushController/index.d.ts"
},
"./push-services/types": {
"import": "./dist/NotificationServicesPushController/types/index.mjs",
"require": "./dist/NotificationServicesPushController/types/index.js",
"types": "./dist/types/NotificationServicesPushController/types/index.d.ts"
},
"./push-services/utils": {
"import": "./dist/NotificationServicesPushController/utils/index.mjs",
"require": "./dist/NotificationServicesPushController/utils/index.js",
"types": "./dist/types/NotificationServicesPushController/utils/index.d.ts"
},
"./push-services/mocks": {
"import": "./dist/NotificationServicesPushController/__fixtures__/index.mjs",
"require": "./dist/NotificationServicesPushController/__fixtures__/index.js",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/notification-services-controller",
"version": "1.0.0",
"private": true,
"description": "",
"license": "MIT",
"sideEffects": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/notification-services-controller",
"version": "1.0.0",
"private": true,
"description": "",
"license": "MIT",
"sideEffects": false,
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export { Controller };
export default NotificationServicesController;
export * from './NotificationServicesController';
export * as Types from './types';
export * as Mocks from './__fixtures__';
export * from './types';
export * as Processors from './processors';
export * from './processors';
export * as Constants from './constants';
export * from './constants';
export * as Mocks from './__fixtures__';
export * as UI from './ui';
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ export { Controller };
export default NotificationServicesPushController;
export * from './NotificationServicesPushController';
export * as Types from './types';
export * from './types';
export * as Utils from './utils';
export * from './utils';
export * as Mocks from './__fixtures__';
2 changes: 1 addition & 1 deletion packages/profile-sync-controller/auth/mocks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/profile-sync-controller",
"version": "1.0.0",
"private": true,
"description": "",
"license": "MIT",
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/profile-sync-controller/auth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/profile-sync-controller",
"version": "1.0.0",
"private": true,
"description": "",
"license": "MIT",
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/profile-sync-controller/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/profile-sync-controller",
"version": "1.0.0",
"private": true,
"description": "",
"license": "MIT",
"sideEffects": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/profile-sync-controller",
"version": "1.0.0",
"private": true,
"description": "",
"license": "MIT",
"sideEffects": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/profile-sync-controller",
"version": "1.0.0",
"private": true,
"description": "",
"license": "MIT",
"sideEffects": false,
Expand Down
Loading