@toptal/davinci-storybook 6.0.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +3 -3
- package/bin/davinci-storybook-init.mjs +3 -4
- package/docs/visual-testing.md +2 -2
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @toptal/davinci-storybook
|
|
2
2
|
|
|
3
|
+
## 7.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#2643](https://github.com/toptal/davinci/pull/2643) [`ab9666f`](https://github.com/toptal/davinci/commit/ab9666f999e7a610f6068e0145200257d8511b46) Thanks [@rocodesign](https://github.com/rocodesign)!
|
|
8
|
+
Migrate package manager from Yarn to pnpm
|
|
9
|
+
**WHAT (breaking change):**
|
|
10
|
+
- switch package manager from Yarn to pnpm across the entire Davinci monorepo
|
|
11
|
+
- add `pnpm-workspace.yaml`, `.npmrc`, and `packageManager` field for corepack support
|
|
12
|
+
- convert Yarn `resolutions` to `pnpm.overrides` in root `package.json`
|
|
13
|
+
- update lerna `npmClient` from `yarn` to `pnpm`
|
|
14
|
+
- replace `yarn` with `pnpm` in root scripts (postinstall, test, test:unit:update)
|
|
15
|
+
**HOW to update:**
|
|
16
|
+
- install pnpm (`corepack enable` or `npm install -g pnpm@10.6.1`)
|
|
17
|
+
- replace `yarn install` with `pnpm install` in local workflows
|
|
18
|
+
- replace `yarn <script>` with `pnpm <script>` when running commands
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [[`ab9666f`](https://github.com/toptal/davinci/commit/ab9666f999e7a610f6068e0145200257d8511b46)]:
|
|
23
|
+
- @toptal/davinci-cli-shared@3.0.0
|
|
24
|
+
- @toptal/davinci-storybook-addons@5.0.0
|
|
25
|
+
- @toptal/davinci-storybook-theme@4.0.0
|
|
26
|
+
- @toptal/davinci-workspace-root@2.0.0
|
|
27
|
+
|
|
3
28
|
## 6.0.0
|
|
4
29
|
|
|
5
30
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -17,17 +17,17 @@ It will install storybook along with predefined addons.
|
|
|
17
17
|
Simple run
|
|
18
18
|
|
|
19
19
|
```shell
|
|
20
|
-
|
|
20
|
+
pnpm storybook
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
To run storybook only for a particular `stories` file
|
|
24
24
|
|
|
25
25
|
```shell
|
|
26
|
-
|
|
26
|
+
pnpm storybook -s hosts/host-1/src/stories/Button.stories.tsx
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
To run storybook from a particular directory:
|
|
30
30
|
|
|
31
31
|
```shell
|
|
32
|
-
|
|
32
|
+
pnpm storybook -s hosts/host-1/src/stories/
|
|
33
33
|
```
|
|
@@ -11,11 +11,10 @@ let spinner = ora('Installing davinci dependencies...').start()
|
|
|
11
11
|
|
|
12
12
|
try {
|
|
13
13
|
runSync(
|
|
14
|
-
'
|
|
14
|
+
'pnpm',
|
|
15
15
|
[
|
|
16
16
|
'add',
|
|
17
|
-
'--dev',
|
|
18
|
-
'-W',
|
|
17
|
+
'--save-dev',
|
|
19
18
|
'@toptal/davinci-skeleton@latest',
|
|
20
19
|
'@toptal/davinci-qa@latest',
|
|
21
20
|
'@toptal/davinci-storybook@latest',
|
|
@@ -112,7 +111,7 @@ fs.writeFileSync(
|
|
|
112
111
|
spinner = ora('Installing packages...').start()
|
|
113
112
|
|
|
114
113
|
try {
|
|
115
|
-
runSync('
|
|
114
|
+
runSync('pnpm', ['install'], {
|
|
116
115
|
stdio: undefined,
|
|
117
116
|
stdout: 'ignore',
|
|
118
117
|
})
|
package/docs/visual-testing.md
CHANGED
|
@@ -42,7 +42,7 @@ To make this check required you need to add it repository settings (**Admin perm
|
|
|
42
42
|
|
|
43
43
|
If you have followed instructions from `Basic setup`, you will have generated GitHub workflow `davinci-storybook-visual.yml` which will trigger visual testing for every PR. It also will trigger on merge to master to set correct `commit sha` to Happo.
|
|
44
44
|
|
|
45
|
-
Or if you want to use custom GitHub workflow, it just needs to call `
|
|
45
|
+
Or if you want to use custom GitHub workflow, it just needs to call `pnpm storybook:test:visual:ci`
|
|
46
46
|
|
|
47
47
|
## Tips and Tricks
|
|
48
48
|
|
|
@@ -50,4 +50,4 @@ We strongly recommend reading [tips and tricks](https://docs.happo.io/docs/story
|
|
|
50
50
|
|
|
51
51
|
## Local debugging
|
|
52
52
|
|
|
53
|
-
To create screenshots locally, you can run `
|
|
53
|
+
To create screenshots locally, you can run `pnpm storybook:test:visual`, but first you need to setup env variables: `HAPPO_PROJECT`, `HAPPO_API_KEY`, `HAPPO_API_SECRET`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/davinci-storybook",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"essentials",
|
|
6
6
|
"storybook",
|
|
@@ -25,15 +25,7 @@
|
|
|
25
25
|
"docs",
|
|
26
26
|
"CHANGELOG.md"
|
|
27
27
|
],
|
|
28
|
-
"scripts": {
|
|
29
|
-
"build-storybook": "storybook build",
|
|
30
|
-
"storybook": "storybook dev -p 6006"
|
|
31
|
-
},
|
|
32
28
|
"dependencies": {
|
|
33
|
-
"@toptal/davinci-cli-shared": "^2.6.1",
|
|
34
|
-
"@toptal/davinci-storybook-addons": "^4.0.1",
|
|
35
|
-
"@toptal/davinci-storybook-theme": "^3.0.1",
|
|
36
|
-
"@toptal/davinci-workspace-root": "^1.0.1",
|
|
37
29
|
"acorn": "^8.8.0",
|
|
38
30
|
"acorn-walk": "^8.2.0",
|
|
39
31
|
"find-up": "^5.0.0",
|
|
@@ -43,7 +35,11 @@
|
|
|
43
35
|
"js-yaml": "^4.1.1",
|
|
44
36
|
"ora": "^5.4.1",
|
|
45
37
|
"ws": "^6.2.3",
|
|
46
|
-
"yargs": "17.7.2"
|
|
38
|
+
"yargs": "17.7.2",
|
|
39
|
+
"@toptal/davinci-cli-shared": "^3.0.0",
|
|
40
|
+
"@toptal/davinci-storybook-addons": "^5.0.0",
|
|
41
|
+
"@toptal/davinci-storybook-theme": "^4.0.0",
|
|
42
|
+
"@toptal/davinci-workspace-root": "^2.0.0"
|
|
47
43
|
},
|
|
48
44
|
"devDependencies": {
|
|
49
45
|
"@babel/plugin-proposal-optional-chaining": "^7.17.12",
|
|
@@ -95,5 +91,9 @@
|
|
|
95
91
|
},
|
|
96
92
|
"publishConfig": {
|
|
97
93
|
"access": "public"
|
|
94
|
+
},
|
|
95
|
+
"scripts": {
|
|
96
|
+
"build-storybook": "storybook build",
|
|
97
|
+
"storybook": "storybook dev -p 6006"
|
|
98
98
|
}
|
|
99
|
-
}
|
|
99
|
+
}
|