@atlaskit/codemod-cli 0.34.0 → 0.34.1

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,14 @@
1
1
  # @atlaskit/codemod-cli
2
2
 
3
+ ## 0.34.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f111803c4e253`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f111803c4e253) -
8
+ Updating typography fallbacks to refreshed typography values as the deprecated legacy typography
9
+ theme has been removed.
10
+ - Updated dependencies
11
+
3
12
  ## 0.34.0
4
13
 
5
14
  ### Minor Changes
package/dist/cjs/main.js CHANGED
@@ -362,7 +362,7 @@ function _main() {
362
362
  case 4:
363
363
  _yield$parseArgs = _context6.sent;
364
364
  packages = _yield$parseArgs.packages;
365
- _process$env$_PACKAGE = "0.0.0-development", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
365
+ _process$env$_PACKAGE = "0.34.0", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
366
366
  logger.log(_chalk.default.bgBlue(_chalk.default.black("\uD83D\uDCDA Atlassian-Frontend codemod library @ ".concat(_PACKAGE_VERSION_, " \uD83D\uDCDA"))));
367
367
  if (packages && packages.length > 0) {
368
368
  logger.log(_chalk.default.gray("Searching for codemods for newer versions of the following packages: ".concat(packages.map(function (pkg) {
@@ -20,7 +20,7 @@ function buildCombinedMap() {
20
20
  }
21
21
 
22
22
  // Filter the typography tokens based on predefined groups and exclusions
23
- var typographyAdg3ThemeFiltered = _tokensRaw.typographyAdg3.filter(function (token) {
23
+ var typographyThemeFiltered = _tokensRaw.typography.filter(function (token) {
24
24
  return typographyGroups.includes(token.attributes.group);
25
25
  }).filter(function (token) {
26
26
  return token.cleanName !== 'font.body.UNSAFE_small';
@@ -38,7 +38,7 @@ function getTokenMap() {
38
38
  var themeIndex = useLegacyTheme ? 1 : 0;
39
39
  if (!tokenMapCache[themeIndex]) {
40
40
  var selectedTheme = useLegacyTheme ? _tokensRaw.legacyLightTokens : _tokensRaw.light;
41
- tokenMapCache[themeIndex] = buildCombinedMap(selectedTheme, _tokensRaw.spacing, _tokensRaw.shape, typographyAdg3ThemeFiltered);
41
+ tokenMapCache[themeIndex] = buildCombinedMap(selectedTheme, _tokensRaw.spacing, _tokensRaw.shape, typographyThemeFiltered);
42
42
  }
43
43
  return tokenMapCache[themeIndex];
44
44
  }
@@ -1,4 +1,4 @@
1
- import { legacyLightTokens as legacyLightTheme, light as lightTheme, shape as shapeTheme, spacing as spacingTheme, typographyAdg3 as typographyAdg3Theme } from '@atlaskit/tokens/tokens-raw';
1
+ import { legacyLightTokens as legacyLightTheme, light as lightTheme, shape as shapeTheme, spacing as spacingTheme, typography as typographyTheme } from '@atlaskit/tokens/tokens-raw';
2
2
  const typographyGroups = ['typography', 'fontWeight', 'fontFamily'];
3
3
  function buildCombinedMap(...arrays) {
4
4
  const combinedMap = {};
@@ -11,7 +11,7 @@ function buildCombinedMap(...arrays) {
11
11
  }
12
12
 
13
13
  // Filter the typography tokens based on predefined groups and exclusions
14
- const typographyAdg3ThemeFiltered = typographyAdg3Theme.filter(token => typographyGroups.includes(token.attributes.group)).filter(token => token.cleanName !== 'font.body.UNSAFE_small');
14
+ const typographyThemeFiltered = typographyTheme.filter(token => typographyGroups.includes(token.attributes.group)).filter(token => token.cleanName !== 'font.body.UNSAFE_small');
15
15
 
16
16
  // Cache array: [0] for light theme, [1] for legacy light theme
17
17
  const tokenMapCache = [null, null];
@@ -24,7 +24,7 @@ export function getTokenMap(useLegacyTheme = false) {
24
24
  const themeIndex = useLegacyTheme ? 1 : 0;
25
25
  if (!tokenMapCache[themeIndex]) {
26
26
  const selectedTheme = useLegacyTheme ? legacyLightTheme : lightTheme;
27
- tokenMapCache[themeIndex] = buildCombinedMap(selectedTheme, spacingTheme, shapeTheme, typographyAdg3ThemeFiltered);
27
+ tokenMapCache[themeIndex] = buildCombinedMap(selectedTheme, spacingTheme, shapeTheme, typographyThemeFiltered);
28
28
  }
29
29
  return tokenMapCache[themeIndex];
30
30
  }
package/dist/esm/main.js CHANGED
@@ -355,7 +355,7 @@ function _main() {
355
355
  case 4:
356
356
  _yield$parseArgs = _context6.sent;
357
357
  packages = _yield$parseArgs.packages;
358
- _process$env$_PACKAGE = "0.0.0-development", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
358
+ _process$env$_PACKAGE = "0.34.0", _PACKAGE_VERSION_ = _process$env$_PACKAGE === void 0 ? '0.0.0-dev' : _process$env$_PACKAGE;
359
359
  logger.log(chalk.bgBlue(chalk.black("\uD83D\uDCDA Atlassian-Frontend codemod library @ ".concat(_PACKAGE_VERSION_, " \uD83D\uDCDA"))));
360
360
  if (packages && packages.length > 0) {
361
361
  logger.log(chalk.gray("Searching for codemods for newer versions of the following packages: ".concat(packages.map(function (pkg) {
@@ -1,4 +1,4 @@
1
- import { legacyLightTokens as legacyLightTheme, light as lightTheme, shape as shapeTheme, spacing as spacingTheme, typographyAdg3 as typographyAdg3Theme } from '@atlaskit/tokens/tokens-raw';
1
+ import { legacyLightTokens as legacyLightTheme, light as lightTheme, shape as shapeTheme, spacing as spacingTheme, typography as typographyTheme } from '@atlaskit/tokens/tokens-raw';
2
2
  var typographyGroups = ['typography', 'fontWeight', 'fontFamily'];
3
3
  function buildCombinedMap() {
4
4
  var combinedMap = {};
@@ -14,7 +14,7 @@ function buildCombinedMap() {
14
14
  }
15
15
 
16
16
  // Filter the typography tokens based on predefined groups and exclusions
17
- var typographyAdg3ThemeFiltered = typographyAdg3Theme.filter(function (token) {
17
+ var typographyThemeFiltered = typographyTheme.filter(function (token) {
18
18
  return typographyGroups.includes(token.attributes.group);
19
19
  }).filter(function (token) {
20
20
  return token.cleanName !== 'font.body.UNSAFE_small';
@@ -32,7 +32,7 @@ export function getTokenMap() {
32
32
  var themeIndex = useLegacyTheme ? 1 : 0;
33
33
  if (!tokenMapCache[themeIndex]) {
34
34
  var selectedTheme = useLegacyTheme ? legacyLightTheme : lightTheme;
35
- tokenMapCache[themeIndex] = buildCombinedMap(selectedTheme, spacingTheme, shapeTheme, typographyAdg3ThemeFiltered);
35
+ tokenMapCache[themeIndex] = buildCombinedMap(selectedTheme, spacingTheme, shapeTheme, typographyThemeFiltered);
36
36
  }
37
37
  return tokenMapCache[themeIndex];
38
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/codemod-cli",
3
- "version": "0.34.0",
3
+ "version": "0.34.1",
4
4
  "description": "A cli for distributing codemods for atlassian-frontend components and services",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/codemod-utils": "^4.2.0",
32
32
  "@atlaskit/icon": "^29.4.0",
33
33
  "@atlaskit/icon-lab": "^5.14.0",
34
- "@atlaskit/tokens": "^9.1.0",
34
+ "@atlaskit/tokens": "^10.0.0",
35
35
  "@babel/runtime": "^7.0.0",
36
36
  "@codeshift/utils": "^0.2.4",
37
37
  "@hypermod/utils": "^0.4.2",