@atlaskit/code 14.5.4 → 14.6.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,21 @@
1
1
  # @atlaskit/code
2
2
 
3
+ ## 14.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
8
+
9
+ ## 14.6.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 14.5.4
4
20
 
5
21
  ### Patch Changes
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/bidi-warning/index.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/bidi-warning/index.d.ts"
11
+ "../dist/types-ts4.5/bidi-warning/index.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/bidi-warning/bidi-warning-decorator.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/bidi-warning/bidi-warning-decorator.d.ts"
11
+ "../dist/types-ts4.5/bidi-warning/bidi-warning-decorator.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/entry-points/block.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/entry-points/block.d.ts"
11
+ "../dist/types-ts4.5/entry-points/block.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/entry-points/constants.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/entry-points/constants.d.ts"
11
+ "../dist/types-ts4.5/entry-points/constants.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -9,7 +9,7 @@ exports.default = codeBidiWarningDecorator;
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
10
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
11
11
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
12
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
12
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
13
13
  var bidiCharacterRegex = /[\u202A-\u202E\u2066-\u2069]/g;
14
14
 
15
15
  /**
@@ -78,7 +78,8 @@ var generator = function generator(options) {
78
78
  var _default = generator({
79
79
  loader: function loader() {
80
80
  return Promise.resolve().then(function () {
81
- return _interopRequireWildcard(require('refractor'));
81
+ return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_refractor-import" */
82
+ 'refractor'));
82
83
  }).then(function (module) {
83
84
  // Webpack 3 returns module.exports as default as module, but webpack 4 returns module.exports as module.default
84
85
  return module.default || module;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/code",
3
- "version": "14.5.4",
3
+ "version": "14.6.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/code",
3
- "version": "14.5.4",
3
+ "version": "14.6.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
3
3
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
5
  export var bidiCharacterRegex = /[\u202A-\u202E\u2066-\u2069]/g;
6
6
 
7
7
  /**
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/code",
3
- "version": "14.5.4",
3
+ "version": "14.6.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,4 +1,4 @@
1
- export declare type CodeBidiWarningProps = {
1
+ export type CodeBidiWarningProps = {
2
2
  /**
3
3
  * A unique string that appears as a data attribute `data-testid`
4
4
  * in the rendered code. Serves as a hook for automated tests.
@@ -308,7 +308,7 @@ export declare const SUPPORTED_LANGUAGES: readonly [{
308
308
  readonly value: "splunk-spl";
309
309
  }];
310
310
  export { CODE_BLOCK_SELECTOR } from './internal/theme/constants';
311
- export declare type Language = typeof SUPPORTED_LANGUAGES[number];
312
- export declare type LanguageAlias = typeof SUPPORTED_LANGUAGES[number]['alias'][number];
313
- export declare type LanguageName = typeof SUPPORTED_LANGUAGES[number]['name'];
314
- export declare type SupportedLanguages = LanguageName | LanguageAlias;
311
+ export type Language = (typeof SUPPORTED_LANGUAGES)[number];
312
+ export type LanguageAlias = (typeof SUPPORTED_LANGUAGES)[number]['alias'][number];
313
+ export type LanguageName = (typeof SUPPORTED_LANGUAGES)[number]['name'];
314
+ export type SupportedLanguages = LanguageName | LanguageAlias;
@@ -24,4 +24,4 @@ export declare const getCodeBlockStyles: (theme: CodeBlockTheme) => (highlighted
24
24
  export declare const getCodeStyles: (globalTheme: Theme | {
25
25
  theme: Theme;
26
26
  }) => CSSObject;
27
- export declare const getCodeBlockTheme: (globalTheme: Theme, maxLines?: number | undefined) => CodeBlockTheme;
27
+ export declare const getCodeBlockTheme: (globalTheme: Theme, maxLines?: number) => CodeBlockTheme;
@@ -1,2 +1,2 @@
1
1
  import { SupportedLanguages } from '../types';
2
- export declare const normalizeLanguage: import("memoize-one").MemoizedFn<(language?: SupportedLanguages | undefined) => string>;
2
+ export declare const normalizeLanguage: import("memoize-one").MemoizedFn<(language?: SupportedLanguages) => string>;
@@ -1,5 +1,5 @@
1
1
  import { AST, RefractorNode, SyntaxHighlighterLineProps } from '../../types';
2
- export declare type CreateLineElementProps = {
2
+ export type CreateLineElementProps = {
3
3
  children: RefractorNode[];
4
4
  lineNumber: number;
5
5
  showLineNumbers?: boolean;
@@ -8,13 +8,13 @@ export declare class SyntaxHighlighter extends React.PureComponent<SyntaxHighlig
8
8
  * Function that receives current line number as argument and returns a
9
9
  * line props object to be applied to each `span` wrapping code line.
10
10
  */
11
- declare type lineTagPropsFunction = (lineNumber?: number) => AST.Properties;
11
+ type lineTagPropsFunction = (lineNumber?: number) => AST.Properties;
12
12
  /**
13
13
  * Props to be passed to the `span` wrapping each code line. Can be an
14
14
  * object or a function that receives current line number as argument and
15
15
  * returns a props object.
16
16
  */
17
- export declare type SyntaxHighlighterLineProps = lineTagPropsFunction | AST.Properties;
17
+ export type SyntaxHighlighterLineProps = lineTagPropsFunction | AST.Properties;
18
18
  export interface SyntaxHighlighterProps {
19
19
  /**
20
20
  * A unique string that appears as a data attribute `data-testid`
@@ -126,4 +126,4 @@ export interface CodeBidiWarningConfig {
126
126
  interface IAstGenerator {
127
127
  highlight: (code: string, language: string) => RefractorNode[];
128
128
  }
129
- export declare type AstGenerator = IAstGenerator | null;
129
+ export type AstGenerator = IAstGenerator | null;
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/entry-points/inline.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/entry-points/inline.d.ts"
11
+ "../dist/types-ts4.5/entry-points/inline.d.ts"
12
12
  ]
13
13
  }
14
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/code",
3
- "version": "14.5.4",
3
+ "version": "14.6.1",
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,6 +12,14 @@
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.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
15
23
  "sideEffects": false,
16
24
  "atlaskit:src": "src/index.tsx",
17
25
  "atlassian": {
@@ -26,10 +34,10 @@
26
34
  "access": "public"
27
35
  },
28
36
  "dependencies": {
29
- "@atlaskit/codemod-utils": "^4.1.0",
30
- "@atlaskit/theme": "^12.4.0",
31
- "@atlaskit/tokens": "^1.2.0",
32
- "@atlaskit/tooltip": "^17.7.0",
37
+ "@atlaskit/codemod-utils": "^4.2.0",
38
+ "@atlaskit/theme": "^12.5.0",
39
+ "@atlaskit/tokens": "^1.4.0",
40
+ "@atlaskit/tooltip": "^17.8.0",
33
41
  "@babel/runtime": "^7.0.0",
34
42
  "@emotion/react": "^11.7.1",
35
43
  "memoize-one": "^6.0.0",
@@ -39,15 +47,15 @@
39
47
  "react": "^16.8.0"
40
48
  },
41
49
  "devDependencies": {
42
- "@atlaskit/button": "^16.6.0",
43
- "@atlaskit/docs": "^9.0.0",
44
- "@atlaskit/ds-explorations": "^2.0.1",
45
- "@atlaskit/ds-lib": "^2.1.0",
46
- "@atlaskit/form": "^8.9.0",
47
- "@atlaskit/primitives": "^0.8.0",
48
- "@atlaskit/section-message": "^6.3.0",
50
+ "@atlaskit/button": "^16.7.0",
51
+ "@atlaskit/docs": "^9.1.0",
52
+ "@atlaskit/ds-explorations": "^2.1.0",
53
+ "@atlaskit/ds-lib": "^2.2.0",
54
+ "@atlaskit/form": "^8.11.0",
55
+ "@atlaskit/primitives": "^0.9.0",
56
+ "@atlaskit/section-message": "^6.4.0",
49
57
  "@atlaskit/ssr": "*",
50
- "@atlaskit/toggle": "^12.5.0",
58
+ "@atlaskit/toggle": "^12.6.0",
51
59
  "@atlaskit/visual-regression": "*",
52
60
  "@atlaskit/webdriver-runner": "*",
53
61
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
@@ -58,7 +66,7 @@
58
66
  "jscodeshift": "^0.13.0",
59
67
  "prismjs": "^1.25.0",
60
68
  "react-dom": "^16.8.0",
61
- "typescript": "4.5.5"
69
+ "typescript": "~4.9.5"
62
70
  },
63
71
  "keywords": [
64
72
  "atlaskit",
package/report.api.md CHANGED
@@ -434,13 +434,14 @@ export const getCodeStyles: (
434
434
  ) => CSSObject;
435
435
 
436
436
  // @public (undocumented)
437
- export type Language = typeof SUPPORTED_LANGUAGES[number];
437
+ export type Language = (typeof SUPPORTED_LANGUAGES)[number];
438
438
 
439
439
  // @public (undocumented)
440
- export type LanguageAlias = typeof SUPPORTED_LANGUAGES[number]['alias'][number];
440
+ export type LanguageAlias =
441
+ (typeof SUPPORTED_LANGUAGES)[number]['alias'][number];
441
442
 
442
443
  // @public (undocumented)
443
- type LanguageName = typeof SUPPORTED_LANGUAGES[number]['name'];
444
+ type LanguageName = (typeof SUPPORTED_LANGUAGES)[number]['name'];
444
445
 
445
446
  // @public (undocumented)
446
447
  export const SUPPORTED_LANGUAGES: readonly [
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/entry-points/types.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/entry-points/types.d.ts"
11
+ "../dist/types-ts4.5/entry-points/types.d.ts"
12
12
  ]
13
13
  }
14
14
  }