@carbon/charts-svelte 0.54.4 → 0.54.8
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 +32 -0
- package/README.md +62 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.54.8](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.7...v0.54.8) (2022-01-25)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @carbon/charts-svelte
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.54.7](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.6...v0.54.7) (2022-01-13)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @carbon/charts-svelte
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.54.6](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.5...v0.54.6) (2022-01-13)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @carbon/charts-svelte
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [0.54.5](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.4...v0.54.5) (2022-01-11)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @carbon/charts-svelte
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
## [0.54.4](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.3...v0.54.4) (2022-01-10)
|
|
7
39
|
|
|
8
40
|
**Note:** Version bump only for package @carbon/charts-svelte
|
package/README.md
CHANGED
|
@@ -113,10 +113,18 @@ No additional configuration should be necessary.
|
|
|
113
113
|
|
|
114
114
|
### Rollup
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
#### ReferenceError: process is not defined
|
|
117
|
+
|
|
118
|
+
Install and add
|
|
118
119
|
[@rollup/plugin-replace](https://github.com/rollup/plugins/tree/master/packages/replace)
|
|
119
|
-
|
|
120
|
+
to the list of plugins in `rollup.config.js` to avoid the
|
|
121
|
+
`process is not defined` runtime error.
|
|
122
|
+
|
|
123
|
+
This plugin statically replaces strings in bundled files with the specified
|
|
124
|
+
value.
|
|
125
|
+
|
|
126
|
+
In the example below, all instances of `process.env.NODE_ENV` will be replaced
|
|
127
|
+
with `"production"` while bundling.
|
|
120
128
|
|
|
121
129
|
```js
|
|
122
130
|
// rollup.config.js
|
|
@@ -129,11 +137,61 @@ export default {
|
|
|
129
137
|
preventAssignment: true,
|
|
130
138
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
131
139
|
}),
|
|
132
|
-
// ...
|
|
133
140
|
],
|
|
134
141
|
};
|
|
135
142
|
```
|
|
136
143
|
|
|
144
|
+
#### `this` has been rewritten to `undefined`
|
|
145
|
+
|
|
146
|
+
Set [`context: "window"`](https://rollupjs.org/guide/en/#context) to address the
|
|
147
|
+
`this has been rewritten to undefined` Rollup error.
|
|
148
|
+
|
|
149
|
+
```diff
|
|
150
|
+
export default {
|
|
151
|
+
+ context: "window",
|
|
152
|
+
};
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
#### Circular dependency warnings
|
|
156
|
+
|
|
157
|
+
You may see circular dependency warnings for `d3` and `@carbon/charts` packages
|
|
158
|
+
that can be safely ignored.
|
|
159
|
+
|
|
160
|
+
Use the `onwarn` option to selectively ignore these warnings.
|
|
161
|
+
|
|
162
|
+
```js
|
|
163
|
+
// rollup.config.js
|
|
164
|
+
export default {
|
|
165
|
+
onwarn: (warning, warn) => {
|
|
166
|
+
// omit circular dependency warnings emitted from
|
|
167
|
+
// "d3-*" packages and "@carbon/charts"
|
|
168
|
+
if (
|
|
169
|
+
warning.code === 'CIRCULAR_DEPENDENCY' &&
|
|
170
|
+
/^node_modules\/(d3-|@carbon\/charts)/.test(warning.importer)
|
|
171
|
+
) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// preserve all other warnings
|
|
176
|
+
warn(warning);
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
#### Dynamic imports
|
|
182
|
+
|
|
183
|
+
If using [dynamic imports](https://rollupjs.org/guide/en/#dynamic-import), set
|
|
184
|
+
`inlineDynamicImports: true` in `rollup.config.js` to enable code-splitting.
|
|
185
|
+
|
|
186
|
+
Otherwise, you may encounter the Rollup error
|
|
187
|
+
`Invalid value "iife" for option "output.format" - UMD and IIFE output formats are not supported for code-splitting builds.`
|
|
188
|
+
|
|
189
|
+
```diff
|
|
190
|
+
export default {
|
|
191
|
+
+ inlineDynamicImports: true,
|
|
192
|
+
};
|
|
193
|
+
```
|
|
194
|
+
|
|
137
195
|
### Webpack
|
|
138
196
|
|
|
139
197
|
[webpack](https://github.com/webpack/webpack) is another popular application
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/charts-svelte",
|
|
3
|
-
"version": "0.54.
|
|
3
|
+
"version": "0.54.8",
|
|
4
4
|
"description": "Carbon charting components for Svelte",
|
|
5
5
|
"main": "./bundle.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://github.com/carbon-design-system/carbon-charts#readme",
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@carbon/charts": "^0.54.
|
|
53
|
+
"@carbon/charts": "^0.54.8",
|
|
54
54
|
"@carbon/telemetry": "0.0.0-alpha.6"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|