@atlaskit/code 14.4.1 → 14.4.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/codemods/13.0.0-remove-unnecessary-code-props.tsx +9 -11
  3. package/codemods/utils/helpers.tsx +17 -22
  4. package/dist/cjs/version.json +1 -1
  5. package/dist/es2019/version.json +1 -1
  6. package/dist/esm/version.json +1 -1
  7. package/package.json +3 -11
  8. package/report.api.md +407 -474
  9. package/dist/types-ts4.0/bidi-warning/bidi-warning-decorator.d.ts +0 -5
  10. package/dist/types-ts4.0/bidi-warning/index.d.ts +0 -1
  11. package/dist/types-ts4.0/bidi-warning/ui/index.d.ts +0 -3
  12. package/dist/types-ts4.0/bidi-warning/ui/styled.d.ts +0 -8
  13. package/dist/types-ts4.0/bidi-warning/ui/types.d.ts +0 -33
  14. package/dist/types-ts4.0/code-block.d.ts +0 -13
  15. package/dist/types-ts4.0/code.d.ts +0 -16
  16. package/dist/types-ts4.0/constants.d.ts +0 -625
  17. package/dist/types-ts4.0/entry-points/block.d.ts +0 -2
  18. package/dist/types-ts4.0/entry-points/constants.d.ts +0 -1
  19. package/dist/types-ts4.0/entry-points/inline.d.ts +0 -2
  20. package/dist/types-ts4.0/entry-points/types.d.ts +0 -1
  21. package/dist/types-ts4.0/extract-react-types/code-block.d.ts +0 -37
  22. package/dist/types-ts4.0/extract-react-types/code.d.ts +0 -2
  23. package/dist/types-ts4.0/index.d.ts +0 -4
  24. package/dist/types-ts4.0/internal/hooks/use-highlight.d.ts +0 -6
  25. package/dist/types-ts4.0/internal/theme/constants.d.ts +0 -8
  26. package/dist/types-ts4.0/internal/theme/get-theme.d.ts +0 -7
  27. package/dist/types-ts4.0/internal/theme/styles.d.ts +0 -27
  28. package/dist/types-ts4.0/internal/theme/types.d.ts +0 -57
  29. package/dist/types-ts4.0/internal/types.d.ts +0 -57
  30. package/dist/types-ts4.0/internal/utils/get-normalized-language.d.ts +0 -2
  31. package/dist/types-ts4.0/react-syntax-highlighter-bidi-warning-renderer.d.ts +0 -9
  32. package/dist/types-ts4.0/types.d.ts +0 -32
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/code
2
2
 
3
+ ## 14.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 14.4.1
4
10
 
5
11
  ### Patch Changes
@@ -35,21 +35,19 @@ function removeProps(
35
35
  jsxAttributeCollection.remove();
36
36
  }
37
37
 
38
- const jsxSpreadIdentifierPropertyCollection = getJSXSpreadIdentifierAttributesByName(
39
- j,
40
- collection,
41
- jsxElementPath,
42
- propName,
43
- );
38
+ const jsxSpreadIdentifierPropertyCollection =
39
+ getJSXSpreadIdentifierAttributesByName(
40
+ j,
41
+ collection,
42
+ jsxElementPath,
43
+ propName,
44
+ );
44
45
  if (jsxSpreadIdentifierPropertyCollection) {
45
46
  jsxSpreadIdentifierPropertyCollection.remove();
46
47
  }
47
48
 
48
- const jsxSpreadExpressionPropertyCollection = getJSXSpreadObjectExpressionAttributesByName(
49
- j,
50
- jsxElementPath,
51
- propName,
52
- );
49
+ const jsxSpreadExpressionPropertyCollection =
50
+ getJSXSpreadObjectExpressionAttributesByName(j, jsxElementPath, propName);
53
51
  if (jsxSpreadExpressionPropertyCollection) {
54
52
  jsxSpreadExpressionPropertyCollection.remove();
55
53
  }
@@ -49,10 +49,8 @@ export function getDynamicImportCollection(
49
49
  importPath: string,
50
50
  ) {
51
51
  return collection.find(j.CallExpression).filter((callExpressionPath) => {
52
- const {
53
- callee,
54
- arguments: callExpressionArguments,
55
- } = callExpressionPath.node;
52
+ const { callee, arguments: callExpressionArguments } =
53
+ callExpressionPath.node;
56
54
 
57
55
  return !!(
58
56
  isCallExpressionCalleeImportType(callee) &&
@@ -246,24 +244,21 @@ export function getJSXSpreadObjectExpressionAttributesByName(
246
244
  );
247
245
  }
248
246
 
249
- export const createRemoveFuncFor = (
250
- component: string,
251
- importName: string,
252
- prop: string,
253
- comment?: string,
254
- ) => (j: core.JSCodeshift, source: Collection<Node>) => {
255
- const specifier = getNamedSpecifier(j, source, component, importName);
247
+ export const createRemoveFuncFor =
248
+ (component: string, importName: string, prop: string, comment?: string) =>
249
+ (j: core.JSCodeshift, source: Collection<Node>) => {
250
+ const specifier = getNamedSpecifier(j, source, component, importName);
256
251
 
257
- if (!specifier) {
258
- return;
259
- }
252
+ if (!specifier) {
253
+ return;
254
+ }
260
255
 
261
- source.findJSXElements(specifier).forEach((element) => {
262
- getJSXAttributesByName(j, element, prop).forEach((attribute: any) => {
263
- j(attribute).remove();
264
- if (comment) {
265
- addCommentToStartOfFile({ j, base: source, message: comment });
266
- }
256
+ source.findJSXElements(specifier).forEach((element) => {
257
+ getJSXAttributesByName(j, element, prop).forEach((attribute: any) => {
258
+ j(attribute).remove();
259
+ if (comment) {
260
+ addCommentToStartOfFile({ j, base: source, message: comment });
261
+ }
262
+ });
267
263
  });
268
- });
269
- };
264
+ };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/code",
3
- "version": "14.4.1",
3
+ "version": "14.4.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/code",
3
- "version": "14.4.1",
3
+ "version": "14.4.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/code",
3
- "version": "14.4.1",
3
+ "version": "14.4.2",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/code",
3
- "version": "14.4.1",
3
+ "version": "14.4.2",
4
4
  "description": "Code highlights short strings of code snippets inline with body text.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,14 +12,6 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.0 <4.5": {
17
- "*": [
18
- "dist/types-ts4.0/*",
19
- "dist/types-ts4.0/index.d.ts"
20
- ]
21
- }
22
- },
23
15
  "sideEffects": false,
24
16
  "atlaskit:src": "src/index.tsx",
25
17
  "atlassian": {
@@ -37,7 +29,7 @@
37
29
  "dependencies": {
38
30
  "@atlaskit/codemod-utils": "^4.1.0",
39
31
  "@atlaskit/theme": "^12.2.0",
40
- "@atlaskit/tokens": "^0.10.0",
32
+ "@atlaskit/tokens": "^0.11.0",
41
33
  "@atlaskit/tooltip": "^17.6.0",
42
34
  "@babel/runtime": "^7.0.0",
43
35
  "@emotion/react": "^11.7.1",
@@ -48,7 +40,7 @@
48
40
  "react": "^16.8.0"
49
41
  },
50
42
  "devDependencies": {
51
- "@atlaskit/button": "^16.3.0",
43
+ "@atlaskit/button": "^16.4.0",
52
44
  "@atlaskit/docs": "^9.0.0",
53
45
  "@atlaskit/ds-lib": "^2.1.0",
54
46
  "@atlaskit/section-message": "^6.3.0",