@atlaskit/adf-utils 19.0.23 → 19.0.24

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 (37) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/builders/package.json +1 -1
  3. package/dist/cjs/validator/validator.js +2 -0
  4. package/dist/es2019/validator/validator.js +2 -0
  5. package/dist/esm/validator/validator.js +2 -0
  6. package/dist/types/builders/marks/annotation.d.ts +1 -1
  7. package/dist/types/builders/marks/border.d.ts +1 -1
  8. package/dist/types/builders/marks/code.d.ts +1 -1
  9. package/dist/types/builders/marks/em.d.ts +1 -1
  10. package/dist/types/builders/marks/link.d.ts +1 -1
  11. package/dist/types/builders/marks/strike.d.ts +1 -1
  12. package/dist/types/builders/marks/strong.d.ts +1 -1
  13. package/dist/types/builders/marks/subsup.d.ts +1 -1
  14. package/dist/types/builders/marks/text-color.d.ts +1 -1
  15. package/dist/types/builders/marks/underline.d.ts +1 -1
  16. package/dist/types/builders/utils/apply-mark.d.ts +1 -1
  17. package/dist/types/validator/utils.d.ts +1 -1
  18. package/dist/types-ts4.5/builders/marks/annotation.d.ts +1 -1
  19. package/dist/types-ts4.5/builders/marks/border.d.ts +1 -1
  20. package/dist/types-ts4.5/builders/marks/code.d.ts +1 -1
  21. package/dist/types-ts4.5/builders/marks/em.d.ts +1 -1
  22. package/dist/types-ts4.5/builders/marks/link.d.ts +1 -1
  23. package/dist/types-ts4.5/builders/marks/strike.d.ts +1 -1
  24. package/dist/types-ts4.5/builders/marks/strong.d.ts +1 -1
  25. package/dist/types-ts4.5/builders/marks/subsup.d.ts +1 -1
  26. package/dist/types-ts4.5/builders/marks/text-color.d.ts +1 -1
  27. package/dist/types-ts4.5/builders/marks/underline.d.ts +1 -1
  28. package/dist/types-ts4.5/builders/utils/apply-mark.d.ts +1 -1
  29. package/dist/types-ts4.5/validator/utils.d.ts +1 -1
  30. package/empty-adf/package.json +1 -1
  31. package/package.json +3 -3
  32. package/scrub/package.json +1 -1
  33. package/transforms/package.json +1 -1
  34. package/traverse/package.json +1 -1
  35. package/types/package.json +1 -1
  36. package/validator/package.json +1 -1
  37. package/validatorTypes/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/adf-utils
2
2
 
3
+ ## 19.0.24
4
+
5
+ ### Patch Changes
6
+
7
+ - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
8
+
3
9
  ## 19.0.23
4
10
 
5
11
  ### Patch Changes
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/builders.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/builders.d.ts"
12
12
  ]
@@ -178,6 +178,8 @@ function validateAttrs(spec, value) {
178
178
  }
179
179
  // extension_node parameters has no type
180
180
  if (!(0, _utils.isDefined)(spec.type)) {
181
+ // @ts-expect-error - property 'optional' does not exist on type 'never'
182
+ // This error was introduced after upgrading to TypeScript 5
181
183
  return !!spec.optional;
182
184
  }
183
185
  switch (spec.type) {
@@ -149,6 +149,8 @@ export function validateAttrs(spec, value) {
149
149
  }
150
150
  // extension_node parameters has no type
151
151
  if (!isDefined(spec.type)) {
152
+ // @ts-expect-error - property 'optional' does not exist on type 'never'
153
+ // This error was introduced after upgrading to TypeScript 5
152
154
  return !!spec.optional;
153
155
  }
154
156
  switch (spec.type) {
@@ -167,6 +167,8 @@ export function validateAttrs(spec, value) {
167
167
  }
168
168
  // extension_node parameters has no type
169
169
  if (!isDefined(spec.type)) {
170
+ // @ts-expect-error - property 'optional' does not exist on type 'never'
171
+ // This error was introduced after upgrading to TypeScript 5
170
172
  return !!spec.optional;
171
173
  }
172
174
  switch (spec.type) {
@@ -1,3 +1,3 @@
1
1
  import { AnnotationMarkAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const annotation: (attrs: AnnotationMarkAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const annotation: (attrs: AnnotationMarkAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { BorderMarkAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const border: (attrs: BorderMarkAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const border: (attrs: BorderMarkAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const code: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const code: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const em: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const em: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { LinkAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const link: (attrs: LinkAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const link: (attrs: LinkAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const strike: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const strike: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const strong: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const strong: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { SubSupAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const subsup: (attrs: SubSupAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const subsup: (attrs: SubSupAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { TextColorAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const textColor: (attrs: TextColorAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const textColor: (attrs: TextColorAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const underline: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const underline: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,4 +1,4 @@
1
1
  import { WithMark } from '../types';
2
2
  export declare function applyMark<T>(mark: T & {
3
3
  type: string;
4
- }, maybeNode: WithMark | string): WithMark;
4
+ }, maybeNode: WithMark | string): WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -5,4 +5,4 @@ export declare const isBoolean: (x: unknown) => x is boolean;
5
5
  export declare const isString: (s: unknown) => s is string;
6
6
  export declare const isPlainObject: (x: unknown) => boolean;
7
7
  export declare const copy: <T extends Record<string | number, any> = Record<string | number, any>>(source: Record<string | number, any>, dest: T, key: string | number) => T;
8
- export declare const makeArray: <T>(maybeArray: T | T[]) => T[];
8
+ export declare const makeArray: <T>(maybeArray: T | Array<T>) => T[];
@@ -1,3 +1,3 @@
1
1
  import { AnnotationMarkAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const annotation: (attrs: AnnotationMarkAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const annotation: (attrs: AnnotationMarkAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { BorderMarkAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const border: (attrs: BorderMarkAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const border: (attrs: BorderMarkAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const code: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const code: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const em: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const em: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { LinkAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const link: (attrs: LinkAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const link: (attrs: LinkAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const strike: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const strike: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const strong: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const strong: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { SubSupAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const subsup: (attrs: SubSupAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const subsup: (attrs: SubSupAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,3 +1,3 @@
1
1
  import { TextColorAttributes } from '@atlaskit/adf-schema';
2
2
  import { WithMark } from '../types';
3
- export declare const textColor: (attrs: TextColorAttributes) => (maybeNode: WithMark | string) => WithMark;
3
+ export declare const textColor: (attrs: TextColorAttributes) => (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,2 +1,2 @@
1
1
  import { WithMark } from '../types';
2
- export declare const underline: (maybeNode: WithMark | string) => WithMark;
2
+ export declare const underline: (maybeNode: WithMark | string) => WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -1,4 +1,4 @@
1
1
  import { WithMark } from '../types';
2
2
  export declare function applyMark<T>(mark: T & {
3
3
  type: string;
4
- }, maybeNode: WithMark | string): WithMark;
4
+ }, maybeNode: WithMark | string): WithMark | import("@atlaskit/adf-schema").TextDefinition;
@@ -5,4 +5,4 @@ export declare const isBoolean: (x: unknown) => x is boolean;
5
5
  export declare const isString: (s: unknown) => s is string;
6
6
  export declare const isPlainObject: (x: unknown) => boolean;
7
7
  export declare const copy: <T extends Record<string | number, any> = Record<string | number, any>>(source: Record<string | number, any>, dest: T, key: string | number) => T;
8
- export declare const makeArray: <T>(maybeArray: T | T[]) => T[];
8
+ export declare const makeArray: <T>(maybeArray: T | Array<T>) => T[];
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/empty-adf.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/empty-adf.d.ts"
12
12
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-utils",
3
- "version": "19.0.23",
3
+ "version": "19.0.24",
4
4
  "description": "Set of utilities to traverse, modify and create ADF documents.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -52,7 +52,7 @@
52
52
  "@atlassian/feature-flags-test-utils": "*",
53
53
  "jscodeshift": "^0.13.0",
54
54
  "react": "^16.8.0",
55
- "typescript": "~4.9.5",
55
+ "typescript": "~5.4.2",
56
56
  "wait-for-expect": "^1.2.0"
57
57
  },
58
58
  "techstack": {
@@ -74,4 +74,4 @@
74
74
  "type": "boolean"
75
75
  }
76
76
  }
77
- }
77
+ }
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/scrub.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/scrub.d.ts"
12
12
  ]
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/transforms.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/transforms.d.ts"
12
12
  ]
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/traverse.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/traverse.d.ts"
12
12
  ]
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/types/index.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/types/index.d.ts"
12
12
  ]
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/validator.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/validator.d.ts"
12
12
  ]
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/types/validatorTypes.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <4.9": {
9
+ ">=4.5 <5.4": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/types/validatorTypes.d.ts"
12
12
  ]