@atlaskit/eslint-plugin-design-system 11.0.1 → 11.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/eslint-plugin-design-system
2
2
 
3
+ ## 11.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#171994](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/171994)
8
+ [`be58e4bb2e387`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/be58e4bb2e387) -
9
+ Migrating usages of UNSAFE types and entrypoints that have been renamed in `@atlaskit/icon` and
10
+ `@atlaskit/icon-lab`.
11
+ - Updated dependencies
12
+
3
13
  ## 11.0.1
4
14
 
5
15
  ### Patch Changes
@@ -10,7 +10,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
12
12
  var _eslintCodemodUtils = require("eslint-codemod-utils");
13
- var _UNSAFE_migrationMap = _interopRequireWildcard(require("@atlaskit/icon/UNSAFE_migration-map"));
13
+ var _migrationMap = _interopRequireWildcard(require("@atlaskit/icon/migration-map"));
14
14
  var _upcomingIcons = require("./upcoming-icons");
15
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
16
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -31,8 +31,8 @@ var isSize = exports.isSize = function isSize(size) {
31
31
  */
32
32
  var getMigrationMapObject = exports.getMigrationMapObject = function getMigrationMapObject(iconPackage) {
33
33
  var key = getIconKey(iconPackage);
34
- if (Object.keys(_UNSAFE_migrationMap.default).includes(key)) {
35
- return _UNSAFE_migrationMap.default[key];
34
+ if (Object.keys(_migrationMap.default).includes(key)) {
35
+ return _migrationMap.default[key];
36
36
  }
37
37
  return null;
38
38
  };
@@ -106,7 +106,7 @@ var createGuidance = exports.createGuidance = function createGuidance(_ref) {
106
106
  } else {
107
107
  guidance += "No equivalent icon for this size, ".concat(size, ", in the current or upcoming set of icons.");
108
108
  }
109
- guidance += "".concat(Object.keys(_UNSAFE_migrationMap.migrationOutcomeDescriptionMap).includes(upcomingIcon.sizeGuidance[size]) ? " Once the upcoming icons are released, please: ".concat(_UNSAFE_migrationMap.migrationOutcomeDescriptionMap[upcomingIcon.sizeGuidance[size]]) : ' No migration size advice given.', "\n");
109
+ guidance += "".concat(Object.keys(_migrationMap.migrationOutcomeDescriptionMap).includes(upcomingIcon.sizeGuidance[size]) ? " Once the upcoming icons are released, please: ".concat(_migrationMap.migrationOutcomeDescriptionMap[upcomingIcon.sizeGuidance[size]]) : ' No migration size advice given.', "\n");
110
110
  } else {
111
111
  guidance = "Please wait for the upcoming icons released, as it will contain an alternative for this legacy icon.\nMigration suggestions, depending on the legacy icon size:\n";
112
112
  for (var _i = 0, _Object$entries = Object.entries(upcomingIcon.sizeGuidance); _i < _Object$entries.length; _i++) {
@@ -114,10 +114,10 @@ var createGuidance = exports.createGuidance = function createGuidance(_ref) {
114
114
  _size = _Object$entries$_i[0],
115
115
  value = _Object$entries$_i[1];
116
116
  guidance += "\t- ".concat(_size, ": ");
117
- if (!Object.keys(_UNSAFE_migrationMap.migrationOutcomeDescriptionMap).includes(value)) {
117
+ if (!Object.keys(_migrationMap.migrationOutcomeDescriptionMap).includes(value)) {
118
118
  guidance += 'No migration advice given.\n';
119
119
  } else {
120
- guidance += "".concat(_UNSAFE_migrationMap.migrationOutcomeDescriptionMap[value], ".\n");
120
+ guidance += "".concat(_migrationMap.migrationOutcomeDescriptionMap[value], ".\n");
121
121
  }
122
122
  }
123
123
  }
@@ -138,7 +138,7 @@ var createGuidance = exports.createGuidance = function createGuidance(_ref) {
138
138
  } else {
139
139
  _guidance += "No equivalent icon for this size, ".concat(size, ", in new set.");
140
140
  }
141
- _guidance += "".concat(Object.keys(_UNSAFE_migrationMap.migrationOutcomeDescriptionMap).includes(migrationMapObject.sizeGuidance[size]) ? " Please: ".concat(_UNSAFE_migrationMap.migrationOutcomeDescriptionMap[migrationMapObject.sizeGuidance[size]]) : ' No migration size advice given.', "\n");
141
+ _guidance += "".concat(Object.keys(_migrationMap.migrationOutcomeDescriptionMap).includes(migrationMapObject.sizeGuidance[size]) ? " Please: ".concat(_migrationMap.migrationOutcomeDescriptionMap[migrationMapObject.sizeGuidance[size]]) : ' No migration size advice given.', "\n");
142
142
  } else {
143
143
  _guidance = "Use ".concat(iconName, " from ").concat(importPath, " instead.\nMigration suggestions, depending on the legacy icon size:\n");
144
144
  Object.entries(migrationMapObject.sizeGuidance).forEach(function (_ref2) {
@@ -146,10 +146,10 @@ var createGuidance = exports.createGuidance = function createGuidance(_ref) {
146
146
  size = _ref3[0],
147
147
  value = _ref3[1];
148
148
  _guidance += "\t- ".concat(size, ": ");
149
- if (!Object.keys(_UNSAFE_migrationMap.migrationOutcomeDescriptionMap).includes(value)) {
149
+ if (!Object.keys(_migrationMap.migrationOutcomeDescriptionMap).includes(value)) {
150
150
  _guidance += 'No migration advice given.\n';
151
151
  } else {
152
- _guidance += "".concat(_UNSAFE_migrationMap.migrationOutcomeDescriptionMap[value], ".\n");
152
+ _guidance += "".concat(_migrationMap.migrationOutcomeDescriptionMap[value], ".\n");
153
153
  }
154
154
  });
155
155
  }
@@ -561,7 +561,7 @@ var checkIfNewIconExist = function checkIfNewIconExist(error) {
561
561
  return false;
562
562
  }
563
563
  var iconKey = getIconKey(error.data.importSource);
564
- var _ref8 = _UNSAFE_migrationMap.default[iconKey] || {},
564
+ var _ref8 = _migrationMap.default[iconKey] || {},
565
565
  newIcon = _ref8.newIcon;
566
566
  return Boolean(newIcon);
567
567
  };
@@ -1,5 +1,5 @@
1
1
  import { isNodeOfType, literal } from 'eslint-codemod-utils';
2
- import baseMigrationMap, { migrationOutcomeDescriptionMap } from '@atlaskit/icon/UNSAFE_migration-map';
2
+ import baseMigrationMap, { migrationOutcomeDescriptionMap } from '@atlaskit/icon/migration-map';
3
3
  import { upcomingIcons } from './upcoming-icons';
4
4
  const sizes = ['small', 'medium', 'large', 'xlarge'];
5
5
  export const isSize = size => sizes.includes(size);
@@ -7,7 +7,7 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
7
7
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
8
8
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
9
9
  import { isNodeOfType, literal } from 'eslint-codemod-utils';
10
- import baseMigrationMap, { migrationOutcomeDescriptionMap } from '@atlaskit/icon/UNSAFE_migration-map';
10
+ import baseMigrationMap, { migrationOutcomeDescriptionMap } from '@atlaskit/icon/migration-map';
11
11
  import { upcomingIcons } from './upcoming-icons';
12
12
  var sizes = ['small', 'medium', 'large', 'xlarge'];
13
13
  export var isSize = function isSize(size) {
@@ -1,6 +1,6 @@
1
1
  import type { Rule } from 'eslint';
2
2
  import { type ImportDeclaration, type JSXAttribute, type Node } from 'eslint-codemod-utils';
3
- import { type IconMigrationSizeGuidance } from '@atlaskit/icon/UNSAFE_migration-map';
3
+ import { type IconMigrationSizeGuidance } from '@atlaskit/icon/migration-map';
4
4
  export type IconMigrationError = Rule.ReportDescriptor;
5
5
  export type RangeList = {
6
6
  start: number;
@@ -1,6 +1,6 @@
1
1
  import type { Rule } from 'eslint';
2
2
  import { type ImportDeclaration, type JSXAttribute, type Node } from 'eslint-codemod-utils';
3
- import { type IconMigrationSizeGuidance } from '@atlaskit/icon/UNSAFE_migration-map';
3
+ import { type IconMigrationSizeGuidance } from '@atlaskit/icon/migration-map';
4
4
  export type IconMigrationError = Rule.ReportDescriptor;
5
5
  export type RangeList = {
6
6
  start: number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
3
  "description": "The essential plugin for use with the Atlassian Design System.",
4
- "version": "11.0.1",
4
+ "version": "11.0.2",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
7
7
  "publishConfig": {
@@ -44,8 +44,8 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@atlaskit/eslint-utils": "^1.7.0",
47
- "@atlaskit/icon": "^22.28.0",
48
- "@atlaskit/icon-lab": "^1.2.0",
47
+ "@atlaskit/icon": "^23.0.0",
48
+ "@atlaskit/icon-lab": "^2.0.0",
49
49
  "@atlaskit/tokens": "*",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@typescript-eslint/utils": "^5.48.1",