@cypress-design/vue-icon 3.3.0 → 3.3.2

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.
@@ -4,7 +4,7 @@ transforming...
4
4
  ✓ 17 modules transformed.
5
5
  rendering chunks...
6
6
  computing gzip size...
7
- dist/index.es.mjs 471.11 kB │ gzip: 94.66 kB │ map: 792.48 kB
7
+ dist/index.es.mjs 478.80 kB │ gzip: 95.07 kB │ map: 803.51 kB
8
8
  Entry module "index.ts" is using named and default exports together. Consumers of your bundle will have to use `Icon.default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.
9
- dist/index.umd.js 432.99 kB │ gzip: 93.54 kB │ map: 775.13 kB
10
- ✓ built in 16.22s
9
+ dist/index.umd.js 434.59 kB │ gzip: 93.68 kB │ map: 784.06 kB
10
+ ✓ built in 10.77s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @cypress-design/vue-icon
2
2
 
3
+ ## 3.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#731](https://github.com/cypress-io/cypress-design/pull/731) [`677c0c0`](https://github.com/cypress-io/cypress-design/commit/677c0c00f3ea3e37e89b38710b919bc03cabec0c) Thanks [@jennifer-shehane](https://github.com/jennifer-shehane)! - Fix tree shaking in `@cypress-design/vue-icon`: importing a single named icon (for example `IconActionPlaySmall`) now bundles about 13 KB instead of every icon plus the full icon registry (about 960 KB). Both icon packages are now marked `"sideEffects": false`. The default `Icon` component still includes every icon because it looks icons up by name at runtime, so prefer named imports.
8
+
9
+ - Updated dependencies []:
10
+ - @cypress-design/icon-registry@3.3.2
11
+
12
+ ## 3.3.1
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [[`f9ee6ab`](https://github.com/cypress-io/cypress-design/commit/f9ee6abd21606fc192bc48a231f055deec94451a)]:
17
+ - @cypress-design/icon-registry@3.3.1
18
+
3
19
  ## 3.3.0
4
20
 
5
21
  ### Minor Changes
package/Icon.ts CHANGED
@@ -15,19 +15,22 @@ interface Props extends Pick<IconProps, 'name'>, Omit<OpenIconProps, 'name'> {
15
15
  class?: any
16
16
  }
17
17
 
18
- export default defineComponent<Props>({
18
+ // PURE so bundlers can drop this component (and the full icon set that
19
+ // compileIcon pulls in) when only the named per-icon components are used
20
+ export default /* @__PURE__ */ defineComponent<Props>({
19
21
  // the props here need to exist because of runtime treatment
20
22
  // if we don't have them explicit, vuejs will think it's attributes
21
23
  // and not pass it down as props to the components
22
24
  // but for typescript to pick up the correct prop types, we need to cast it to unknown
23
- props: [
24
- ...ICON_COLOR_PROP_NAMES,
25
+ // concat() instead of an array spread: esbuild treats a spread as a possible
26
+ // side effect and would keep this component even when it is never imported
27
+ props: /* @__PURE__ */ (ICON_COLOR_PROP_NAMES as readonly string[]).concat([
25
28
  'interactiveColorsOnGroup',
26
29
  'size',
27
30
  'name',
28
31
  'alt',
29
32
  'class',
30
- ] as unknown as undefined,
33
+ ]) as unknown as undefined,
31
34
  setup(
32
35
  // the OpenIconProps helps volar extract the documentation from the props
33
36
  // since the IconProps are more restrictive, it will not change the use behavior