@atlaskit/heading 2.2.0 → 2.3.0
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 +197 -78
- package/dist/cjs/heading.js +3 -5
- package/dist/cjs/heading.partial.js +31 -9
- package/dist/es2019/heading.js +2 -4
- package/dist/es2019/heading.partial.js +30 -7
- package/dist/esm/heading.js +3 -5
- package/dist/esm/heading.partial.js +30 -8
- package/dist/types/heading.d.ts +1 -1
- package/dist/types/heading.partial.d.ts +12 -11
- package/dist/types/types.d.ts +18 -7
- package/dist/types-ts4.5/heading.d.ts +1 -1
- package/dist/types-ts4.5/heading.partial.d.ts +12 -11
- package/dist/types-ts4.5/types.d.ts +18 -7
- package/package.json +5 -3
- package/scripts/codegen.tsx +6 -16
- package/codemods/__tests__/1.6.0-level-to-size.tsx +0 -80
- package/codemods/__tests__/_framework.tsx +0 -46
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { API, FileInfo, Options } from 'jscodeshift';
|
|
2
|
-
|
|
3
|
-
import noop from '@atlaskit/ds-lib/noop';
|
|
4
|
-
|
|
5
|
-
const applyTransform = require('jscodeshift/dist/testUtils').applyTransform;
|
|
6
|
-
|
|
7
|
-
type Transformer = (file: FileInfo, jscodeshift: API, options: Options) => void;
|
|
8
|
-
|
|
9
|
-
type TestArgs = {
|
|
10
|
-
it: string;
|
|
11
|
-
original: string;
|
|
12
|
-
expected: string;
|
|
13
|
-
transformer: Transformer;
|
|
14
|
-
mode?: 'only' | 'skip' | 'standard';
|
|
15
|
-
before?: () => void;
|
|
16
|
-
after?: () => void;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export function check({
|
|
20
|
-
it: name,
|
|
21
|
-
original,
|
|
22
|
-
expected,
|
|
23
|
-
transformer,
|
|
24
|
-
before = noop,
|
|
25
|
-
after = noop,
|
|
26
|
-
mode = 'standard',
|
|
27
|
-
}: TestArgs) {
|
|
28
|
-
const run = mode === 'only' ? it.only : mode === 'skip' ? it.skip : it;
|
|
29
|
-
run(name, () => {
|
|
30
|
-
before();
|
|
31
|
-
try {
|
|
32
|
-
const output: string = applyTransform(
|
|
33
|
-
{ default: transformer, parser: 'tsx' },
|
|
34
|
-
{},
|
|
35
|
-
{ source: original },
|
|
36
|
-
);
|
|
37
|
-
expect(output).toBe(expected.trim());
|
|
38
|
-
} catch (e) {
|
|
39
|
-
// a failed assertion will throw
|
|
40
|
-
after();
|
|
41
|
-
throw e;
|
|
42
|
-
}
|
|
43
|
-
// will only be hit if we don't throw
|
|
44
|
-
after();
|
|
45
|
-
});
|
|
46
|
-
}
|