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

Core: Make prettier an optional peer dependency #29223

Merged
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
8 changes: 8 additions & 0 deletions code/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,14 @@
"use-resize-observer": "^9.1.0",
"watchpack": "^2.2.0"
},
"peerDependencies": {
"prettier": "^2 || ^3"
},
"peerDependenciesMeta": {
"prettier": {
"optional": true
}
},
"publishConfig": {
"access": "public"
},
Expand Down
8 changes: 7 additions & 1 deletion code/core/scripts/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ export const getEntries = (cwd: string) => {
define('src/preview-api/index.ts', ['browser', 'node'], true),
define('src/manager-api/index.ts', ['browser', 'node'], true, ['react']),
define('src/router/index.ts', ['browser', 'node'], true, ['react']),
define('src/components/index.ts', ['browser', 'node'], true, ['react', 'react-dom']),
define(
'src/components/index.ts',
['browser', 'node'],
true,
['react', 'react-dom'],
['prettier'] // the syntax highlighter uses prettier/standalone to format the code
),
define('src/theming/index.ts', ['browser', 'node'], true, ['react']),
define('src/theming/create.ts', ['browser', 'node'], true, ['react']),
define('src/docs-tools/index.ts', ['browser', 'node'], true),
Expand Down
8 changes: 8 additions & 0 deletions code/lib/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,14 @@
"devDependencies": {
"typescript": "^5.3.2"
},
"peerDependencies": {
"prettier": "^2 || ^3"
},
"peerDependenciesMeta": {
"prettier": {
"optional": true
}
},
"publishConfig": {
"access": "public"
},
Expand Down
10 changes: 10 additions & 0 deletions code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6137,6 +6137,11 @@ __metadata:
util: "npm:^0.12.5"
watchpack: "npm:^2.2.0"
ws: "npm:^8.2.3"
peerDependencies:
prettier: ^2 || ^3
peerDependenciesMeta:
prettier:
optional: true
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -26224,6 +26229,11 @@ __metadata:
dependencies:
"@storybook/core": "workspace:*"
typescript: "npm:^5.3.2"
peerDependencies:
prettier: ^2 || ^3
peerDependenciesMeta:
prettier:
optional: true
bin:
getstorybook: ./bin/index.cjs
sb: ./bin/index.cjs
Expand Down