@atlaskit/storybook-addon-design-system 1.0.0 → 1.1.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 +8 -0
- package/manager.js +1 -1
- package/package.json +2 -6
- package/preset.js +1 -1
- package/preview.js +1 -1
- package/tsup.config.ts +0 -110
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/storybook-addon-design-system
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#121858](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/121858)
|
|
8
|
+
[`a1c4a37a57a0c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a1c4a37a57a0c) -
|
|
9
|
+
Fixed the build issue in the previous version.
|
|
10
|
+
|
|
3
11
|
## 1.0.0
|
|
4
12
|
|
|
5
13
|
### Major Changes
|
package/manager.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
import './dist/manager';
|
|
2
|
+
import './dist/esm/manager';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/storybook-addon-design-system",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Design token storybook addon",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -15,9 +15,6 @@
|
|
|
15
15
|
"category": "Tooling"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
"scripts": {
|
|
19
|
-
"build": "tsup"
|
|
20
|
-
},
|
|
21
18
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
22
19
|
"type": "module",
|
|
23
20
|
"main": "src/index.tsx",
|
|
@@ -41,8 +38,7 @@
|
|
|
41
38
|
"@storybook/icons": "^1.2.9",
|
|
42
39
|
"@storybook/manager-api": "^8.1.10",
|
|
43
40
|
"@storybook/preview-api": "^8.1.10",
|
|
44
|
-
"@storybook/types": "8.0.0"
|
|
45
|
-
"tsup": "^8.0.2"
|
|
41
|
+
"@storybook/types": "8.0.0"
|
|
46
42
|
},
|
|
47
43
|
"peerDependencies": {
|
|
48
44
|
"react": "^16.8.0 || ^17.0.0 || ~18.2.0"
|
package/preset.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
module.exports = require('./dist/preset.
|
|
2
|
+
module.exports = require('./dist/esm/preset.js');
|
package/preview.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
export { default } from './dist/preview';
|
|
2
|
+
export { default } from './dist/esm/preview';
|
package/tsup.config.ts
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @repo/internal/fs/filename-pattern-match */
|
|
2
|
-
import { readFile } from 'fs/promises';
|
|
3
|
-
|
|
4
|
-
import { defineConfig, type Options } from 'tsup';
|
|
5
|
-
|
|
6
|
-
// The current browsers supported by Storybook v7
|
|
7
|
-
const BROWSER_TARGET: Options['target'] = ['chrome100', 'safari15', 'firefox91'];
|
|
8
|
-
const NODE_TARGET: Options['target'] = ['node18'];
|
|
9
|
-
|
|
10
|
-
type BundlerConfig = {
|
|
11
|
-
bundler?: {
|
|
12
|
-
exportEntries?: string[];
|
|
13
|
-
nodeEntries?: string[];
|
|
14
|
-
managerEntries?: string[];
|
|
15
|
-
previewEntries?: string[];
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
// eslint-disable-next-line import/no-anonymous-default-export
|
|
20
|
-
export default defineConfig(async (options) => {
|
|
21
|
-
// reading the three types of entries from package.json, which has the following structure:
|
|
22
|
-
// {
|
|
23
|
-
// ...
|
|
24
|
-
// "bundler": {
|
|
25
|
-
// "exportEntries": ["./src/index.ts"],
|
|
26
|
-
// "managerEntries": ["./src/manager.ts"],
|
|
27
|
-
// "previewEntries": ["./src/preview.ts"]
|
|
28
|
-
// "nodeEntries": ["./src/preset.ts"]
|
|
29
|
-
// }
|
|
30
|
-
// }
|
|
31
|
-
const packageJson = (await readFile('./package.json', 'utf8').then(JSON.parse)) as BundlerConfig;
|
|
32
|
-
const {
|
|
33
|
-
bundler: {
|
|
34
|
-
exportEntries = [],
|
|
35
|
-
managerEntries = [],
|
|
36
|
-
previewEntries = [],
|
|
37
|
-
nodeEntries = [],
|
|
38
|
-
} = {},
|
|
39
|
-
} = packageJson;
|
|
40
|
-
|
|
41
|
-
const commonConfig: Options = {
|
|
42
|
-
splitting: false,
|
|
43
|
-
minify: !options.watch,
|
|
44
|
-
treeshake: true,
|
|
45
|
-
sourcemap: true,
|
|
46
|
-
clean: true,
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const configs: Options[] = [];
|
|
50
|
-
|
|
51
|
-
// export entries are entries meant to be manually imported by the user
|
|
52
|
-
// they are not meant to be loaded by the manager or preview
|
|
53
|
-
// they'll be usable in both node and browser environments, depending on which features and modules they depend on
|
|
54
|
-
if (exportEntries.length) {
|
|
55
|
-
configs.push({
|
|
56
|
-
...commonConfig,
|
|
57
|
-
entry: exportEntries,
|
|
58
|
-
dts: {
|
|
59
|
-
resolve: true,
|
|
60
|
-
},
|
|
61
|
-
format: ['esm', 'cjs'],
|
|
62
|
-
target: [...BROWSER_TARGET, ...NODE_TARGET],
|
|
63
|
-
platform: 'neutral',
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// manager entries are entries meant to be loaded into the manager UI
|
|
68
|
-
// they'll have manager-specific packages externalized and they won't be usable in node
|
|
69
|
-
// they won't have types generated for them as they're usually loaded automatically by Storybook
|
|
70
|
-
if (managerEntries.length) {
|
|
71
|
-
configs.push({
|
|
72
|
-
...commonConfig,
|
|
73
|
-
entry: managerEntries,
|
|
74
|
-
format: ['esm'],
|
|
75
|
-
target: BROWSER_TARGET,
|
|
76
|
-
platform: 'browser',
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// preview entries are entries meant to be loaded into the preview iframe
|
|
81
|
-
// they'll have preview-specific packages externalized and they won't be usable in node
|
|
82
|
-
// they'll have types generated for them so they can be imported when setting up Portable Stories
|
|
83
|
-
if (previewEntries.length) {
|
|
84
|
-
configs.push({
|
|
85
|
-
...commonConfig,
|
|
86
|
-
entry: previewEntries,
|
|
87
|
-
dts: {
|
|
88
|
-
resolve: true,
|
|
89
|
-
},
|
|
90
|
-
format: ['esm', 'cjs'],
|
|
91
|
-
target: BROWSER_TARGET,
|
|
92
|
-
platform: 'browser',
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// node entries are entries meant to be used in node-only
|
|
97
|
-
// this is useful for presets, which are loaded by Storybook when setting up configurations
|
|
98
|
-
// they won't have types generated for them as they're usually loaded automatically by Storybook
|
|
99
|
-
if (nodeEntries.length) {
|
|
100
|
-
configs.push({
|
|
101
|
-
...commonConfig,
|
|
102
|
-
entry: nodeEntries,
|
|
103
|
-
format: ['cjs'],
|
|
104
|
-
target: NODE_TARGET,
|
|
105
|
-
platform: 'node',
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
return configs;
|
|
110
|
-
});
|