@atlaskit/icon-lab 1.0.1 → 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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # @atlaskit/icon-lab
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#162725](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/162725)
8
+ [`b2449424247a3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b2449424247a3) -
9
+ New deprecation endpoint to identify icons that have been deprecated. Used with the
10
+ `no-deprecated-imports` lint rule to assist with displaying errors and auto-fixing those icons
11
+ with a defined replacement.
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
17
+ ## 1.0.2
18
+
19
+ ### Patch Changes
20
+
21
+ - [#166026](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/166026)
22
+ [`962b5e77810fb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/962b5e77810fb) -
23
+ Adds side-effect config to support Compiled css extraction in third-party apps
24
+
3
25
  ## 1.0.1
4
26
 
5
27
  ### Patch Changes
@@ -3,7 +3,9 @@
3
3
  "main": "../dist/cjs/migration-map.js",
4
4
  "module": "../dist/esm/migration-map.js",
5
5
  "module:es2019": "../dist/es2019/migration-map.js",
6
- "sideEffects": false,
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
7
9
  "types": "../dist/types/migration-map.d.ts",
8
10
  "typesVersions": {
9
11
  ">=4.5 <5.4": {
package/build/index.tsx CHANGED
@@ -3,10 +3,14 @@ import path from 'path';
3
3
  import fs from 'fs-extra';
4
4
  import pkgDir from 'pkg-dir';
5
5
 
6
- import { UNSAFE_buildNew as buildIcons, UNSAFE_createIconDocsNew } from '@af/icon-build-process';
7
- import type { UNSAFE_NewIconBuildConfig } from '@af/icon-build-process';
8
-
9
- import iconMetadata from '../icons_raw/metadata-core';
6
+ import {
7
+ UNSAFE_buildNew as buildIcons,
8
+ UNSAFE_createDeprecatedIconDocs,
9
+ UNSAFE_createIconDocsNew,
10
+ type UNSAFE_NewIconBuildConfig,
11
+ } from '@af/icon-build-process';
12
+
13
+ import coreIconMetadata from '../icons_raw/metadata-core';
10
14
  import migrationMap from '../src/migration-map';
11
15
 
12
16
  const root = pkgDir.sync();
@@ -28,7 +32,7 @@ const config: UNSAFE_NewIconBuildConfig = {
28
32
  iconType: 'core',
29
33
  packageName: '@atlaskit/icon-lab',
30
34
  baseIconEntryPoint: '@atlaskit/icon/UNSAFE_base-new',
31
- metadata: iconMetadata,
35
+ metadata: coreIconMetadata,
32
36
  migrationMap: migrationMap,
33
37
  };
34
38
 
@@ -39,9 +43,19 @@ buildIcons(config).then((icons) => {
39
43
  'core',
40
44
  {},
41
45
  ['icon', 'icon-lab', 'core'],
42
- iconMetadata,
46
+ coreIconMetadata,
47
+ migrationMap,
48
+ );
49
+
50
+ fs.outputFile(path.resolve(root, 'src/metadata-core.tsx'), iconDocs);
51
+
52
+ const deprecatedDocs = UNSAFE_createDeprecatedIconDocs(
53
+ icons,
54
+ '@atlaskit/icon-lab',
55
+ 'core',
56
+ coreIconMetadata,
43
57
  migrationMap,
44
58
  );
45
59
 
46
- return fs.outputFile(path.resolve(root, 'src/metadata-core.tsx'), iconDocs);
60
+ fs.outputFile(path.resolve(root, 'src/deprecated-core.tsx'), deprecatedDocs);
47
61
  });
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/icon-lab/deprecated-map",
3
+ "main": "../dist/cjs/entry-points/deprecated-map.js",
4
+ "module": "../dist/esm/entry-points/deprecated-map.js",
5
+ "module:es2019": "../dist/es2019/entry-points/deprecated-map.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../dist/types/entry-points/deprecated-map.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.4": {
12
+ "*": [
13
+ "../dist/types-ts4.5/entry-points/deprecated-map.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ /**
8
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
9
+ *
10
+ * To change the format of this file, modify `UNSAFE_createDeprecatedIconDocs` in icon-build-process/src/create-deprecated-icon-docs.tsx.
11
+ *
12
+ * @codegen <<SignedSource::bdbeb289627e24a55c8fe9daf29c6b55>>
13
+ * @codegenCommand yarn build:icon-glyphs
14
+ */
15
+ var deprecatedIcons = {};
16
+ var _default = exports.default = deprecatedIcons;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ Object.defineProperty(exports, "deprecatedCore", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _deprecatedCore.default;
11
+ }
12
+ });
13
+ var _deprecatedCore = _interopRequireDefault(require("../deprecated-core"));
@@ -9,7 +9,7 @@ exports.default = void 0;
9
9
  *
10
10
  * To change the format of this file, modify `UNSAFE_createIconDocsNew` in icon-build-process/src/create-icon-docs.tsx.
11
11
  *
12
- * @codegen <<SignedSource::fb64e80f33776bd1206895e95a86eaa6>>
12
+ * @codegen <<SignedSource::d67ababae6561c34c361bb99f053f31d>>
13
13
  * @codegenCommand yarn build:icon-glyphs
14
14
  */
15
15
 
@@ -0,0 +1,10 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * To change the format of this file, modify `UNSAFE_createDeprecatedIconDocs` in icon-build-process/src/create-deprecated-icon-docs.tsx.
5
+ *
6
+ * @codegen <<SignedSource::bdbeb289627e24a55c8fe9daf29c6b55>>
7
+ * @codegenCommand yarn build:icon-glyphs
8
+ */
9
+ const deprecatedIcons = {};
10
+ export default deprecatedIcons;
@@ -0,0 +1 @@
1
+ export { default as deprecatedCore } from '../deprecated-core';
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * To change the format of this file, modify `UNSAFE_createIconDocsNew` in icon-build-process/src/create-icon-docs.tsx.
5
5
  *
6
- * @codegen <<SignedSource::fb64e80f33776bd1206895e95a86eaa6>>
6
+ * @codegen <<SignedSource::d67ababae6561c34c361bb99f053f31d>>
7
7
  * @codegenCommand yarn build:icon-glyphs
8
8
  */
9
9
 
@@ -0,0 +1,10 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * To change the format of this file, modify `UNSAFE_createDeprecatedIconDocs` in icon-build-process/src/create-deprecated-icon-docs.tsx.
5
+ *
6
+ * @codegen <<SignedSource::bdbeb289627e24a55c8fe9daf29c6b55>>
7
+ * @codegenCommand yarn build:icon-glyphs
8
+ */
9
+ var deprecatedIcons = {};
10
+ export default deprecatedIcons;
@@ -0,0 +1 @@
1
+ export { default as deprecatedCore } from '../deprecated-core';
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * To change the format of this file, modify `UNSAFE_createIconDocsNew` in icon-build-process/src/create-icon-docs.tsx.
5
5
  *
6
- * @codegen <<SignedSource::fb64e80f33776bd1206895e95a86eaa6>>
6
+ * @codegen <<SignedSource::d67ababae6561c34c361bb99f053f31d>>
7
7
  * @codegenCommand yarn build:icon-glyphs
8
8
  */
9
9
 
@@ -0,0 +1,13 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * To change the format of this file, modify `UNSAFE_createDeprecatedIconDocs` in icon-build-process/src/create-deprecated-icon-docs.tsx.
5
+ *
6
+ * @codegen <<SignedSource::bdbeb289627e24a55c8fe9daf29c6b55>>
7
+ * @codegenCommand yarn build:icon-glyphs
8
+ */
9
+ declare const deprecatedIcons: Record<string, {
10
+ message: string;
11
+ unfixable?: boolean;
12
+ }>;
13
+ export default deprecatedIcons;
@@ -0,0 +1 @@
1
+ export { default as deprecatedCore } from '../deprecated-core';
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * To change the format of this file, modify `UNSAFE_createIconDocsNew` in icon-build-process/src/create-icon-docs.tsx.
5
5
  *
6
- * @codegen <<SignedSource::fb64e80f33776bd1206895e95a86eaa6>>
6
+ * @codegen <<SignedSource::d67ababae6561c34c361bb99f053f31d>>
7
7
  * @codegenCommand yarn build:icon-glyphs
8
8
  */
9
9
  interface metadata {
@@ -38,6 +38,10 @@ interface metadata {
38
38
  * The name of the team owning the icon
39
39
  */
40
40
  team: string;
41
+ /**
42
+ * The status of the icon
43
+ */
44
+ status?: 'draft' | 'ready-to-publish' | 'published' | 'modified' | 'deprecated';
41
45
  /**
42
46
  * Contact slack channel for the team owning the icon
43
47
  */
@@ -46,6 +50,14 @@ interface metadata {
46
50
  * A list of keys for old icons that have been replaced by this icon
47
51
  */
48
52
  oldName?: string[];
53
+ /**
54
+ * A replacement icon if this icon has been deprecated
55
+ */
56
+ replacement?: {
57
+ name: string;
58
+ type: 'core' | 'utility';
59
+ location: '@atlaskit/icon' | '@atlaskit/icon-lab' | '@atlassian/icon-private';
60
+ };
49
61
  }
50
62
  declare const metadata: Record<string, metadata>;
51
63
  export default metadata;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * To change the format of this file, modify `UNSAFE_createDeprecatedIconDocs` in icon-build-process/src/create-deprecated-icon-docs.tsx.
5
+ *
6
+ * @codegen <<SignedSource::bdbeb289627e24a55c8fe9daf29c6b55>>
7
+ * @codegenCommand yarn build:icon-glyphs
8
+ */
9
+ declare const deprecatedIcons: Record<string, {
10
+ message: string;
11
+ unfixable?: boolean;
12
+ }>;
13
+ export default deprecatedIcons;
@@ -0,0 +1 @@
1
+ export { default as deprecatedCore } from '../deprecated-core';
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * To change the format of this file, modify `UNSAFE_createIconDocsNew` in icon-build-process/src/create-icon-docs.tsx.
5
5
  *
6
- * @codegen <<SignedSource::fb64e80f33776bd1206895e95a86eaa6>>
6
+ * @codegen <<SignedSource::d67ababae6561c34c361bb99f053f31d>>
7
7
  * @codegenCommand yarn build:icon-glyphs
8
8
  */
9
9
  interface metadata {
@@ -38,6 +38,10 @@ interface metadata {
38
38
  * The name of the team owning the icon
39
39
  */
40
40
  team: string;
41
+ /**
42
+ * The status of the icon
43
+ */
44
+ status?: 'draft' | 'ready-to-publish' | 'published' | 'modified' | 'deprecated';
41
45
  /**
42
46
  * Contact slack channel for the team owning the icon
43
47
  */
@@ -46,6 +50,14 @@ interface metadata {
46
50
  * A list of keys for old icons that have been replaced by this icon
47
51
  */
48
52
  oldName?: string[];
53
+ /**
54
+ * A replacement icon if this icon has been deprecated
55
+ */
56
+ replacement?: {
57
+ name: string;
58
+ type: 'core' | 'utility';
59
+ location: '@atlaskit/icon' | '@atlaskit/icon-lab' | '@atlassian/icon-private';
60
+ };
49
61
  }
50
62
  declare const metadata: Record<string, metadata>;
51
63
  export default metadata;
@@ -3,7 +3,9 @@
3
3
  "main": "../dist/cjs/entry-points/metadata.js",
4
4
  "module": "../dist/esm/entry-points/metadata.js",
5
5
  "module:es2019": "../dist/es2019/entry-points/metadata.js",
6
- "sideEffects": false,
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
7
9
  "types": "../dist/types/entry-points/metadata.d.ts",
8
10
  "typesVersions": {
9
11
  ">=4.5 <5.4": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/icon-lab",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "An icon package for public icon contributions",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,7 +12,9 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "sideEffects": false,
15
+ "sideEffects": [
16
+ "**/*.compiled.css"
17
+ ],
16
18
  "atlaskit:src": "src/index.tsx",
17
19
  "atlassian": {
18
20
  "team": "Design System Team",
@@ -30,17 +32,17 @@
30
32
  "build-glyphs": "ts-node --project ../../../tsconfig.node.json ./build/index.tsx"
31
33
  },
32
34
  "dependencies": {
33
- "@atlaskit/icon": "^22.21.0",
35
+ "@atlaskit/icon": "^22.25.0",
34
36
  "@babel/runtime": "^7.0.0"
35
37
  },
36
38
  "peerDependencies": {
37
39
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
38
40
  },
39
41
  "devDependencies": {
40
- "@af/icon-build-process": "^2.1.0",
42
+ "@af/icon-build-process": "^2.2.0",
41
43
  "@af/integration-testing": "*",
42
44
  "@af/visual-regression": "*",
43
- "@atlaskit/ds-lib": "^3.0.0",
45
+ "@atlaskit/ds-lib": "^3.2.0",
44
46
  "@atlaskit/ssr": "*",
45
47
  "@testing-library/react": "^12.1.5",
46
48
  "fs-extra": "^4.0.2",
@@ -80,6 +82,7 @@
80
82
  }
81
83
  },
82
84
  "af:exports": {
85
+ "./deprecated-map": "./src/entry-points/deprecated-map.tsx",
83
86
  "./metadata": "./src/entry-points/metadata.tsx",
84
87
  "./UNSAFE_migration-map": "./src/migration-map.tsx",
85
88
  "./core": "./core",