@atlaspack/transformer-webmanifest 2.14.5-canary.14 → 2.14.5-canary.141

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,135 @@
1
1
  # @atlaspack/transformer-webmanifest
2
2
 
3
+ ## 2.14.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @atlaspack/utils@2.17.3
9
+ - @atlaspack/plugin@2.14.21
10
+
11
+ ## 2.14.20
12
+
13
+ ### Patch Changes
14
+
15
+ - [#702](https://github.com/atlassian-labs/atlaspack/pull/702) [`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa) Thanks [@alshdavid](https://github.com/alshdavid)! - Fixes to Flow types
16
+
17
+ - Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
18
+ - @atlaspack/plugin@2.14.20
19
+ - @atlaspack/utils@2.17.2
20
+
21
+ ## 2.14.19
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies []:
26
+ - @atlaspack/utils@2.17.1
27
+ - @atlaspack/plugin@2.14.19
28
+
29
+ ## 2.14.18
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies [[`dbb4072`](https://github.com/atlassian-labs/atlaspack/commit/dbb40721ebeb45990a14ba04e6b44e7f836fb32d), [`de23e0c`](https://github.com/atlassian-labs/atlaspack/commit/de23e0ce49d5504fe3947ac26640a3d951087da3), [`18a57cf`](https://github.com/atlassian-labs/atlaspack/commit/18a57cf8a4789b2de5ad8e2676f317a26cc91417), [`a5ed1b4`](https://github.com/atlassian-labs/atlaspack/commit/a5ed1b414498560f393ff491af4da25b6e8dde56)]:
34
+ - @atlaspack/utils@2.17.0
35
+ - @atlaspack/plugin@2.14.18
36
+
37
+ ## 2.14.17
38
+
39
+ ### Patch Changes
40
+
41
+ - Updated dependencies []:
42
+ - @atlaspack/utils@2.16.1
43
+ - @atlaspack/plugin@2.14.17
44
+
45
+ ## 2.14.16
46
+
47
+ ### Patch Changes
48
+
49
+ - Updated dependencies [[`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
50
+ - @atlaspack/utils@2.16.0
51
+ - @atlaspack/plugin@2.14.16
52
+
53
+ ## 2.14.15
54
+
55
+ ### Patch Changes
56
+
57
+ - Updated dependencies []:
58
+ - @atlaspack/utils@2.15.3
59
+ - @atlaspack/plugin@2.14.15
60
+
61
+ ## 2.14.14
62
+
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies []:
66
+ - @atlaspack/utils@2.15.2
67
+ - @atlaspack/plugin@2.14.14
68
+
69
+ ## 2.14.13
70
+
71
+ ### Patch Changes
72
+
73
+ - Updated dependencies []:
74
+ - @atlaspack/utils@2.15.1
75
+ - @atlaspack/plugin@2.14.13
76
+
77
+ ## 2.14.12
78
+
79
+ ### Patch Changes
80
+
81
+ - Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
82
+ - @atlaspack/utils@2.15.0
83
+ - @atlaspack/plugin@2.14.12
84
+
85
+ ## 2.14.11
86
+
87
+ ### Patch Changes
88
+
89
+ - Updated dependencies []:
90
+ - @atlaspack/utils@2.14.11
91
+ - @atlaspack/plugin@2.14.11
92
+
93
+ ## 2.14.10
94
+
95
+ ### Patch Changes
96
+
97
+ - Updated dependencies []:
98
+ - @atlaspack/plugin@2.14.10
99
+ - @atlaspack/utils@2.14.10
100
+
101
+ ## 2.14.9
102
+
103
+ ### Patch Changes
104
+
105
+ - Updated dependencies []:
106
+ - @atlaspack/utils@2.14.9
107
+ - @atlaspack/plugin@2.14.9
108
+
109
+ ## 2.14.8
110
+
111
+ ### Patch Changes
112
+
113
+ - Updated dependencies []:
114
+ - @atlaspack/utils@2.14.8
115
+ - @atlaspack/plugin@2.14.8
116
+
117
+ ## 2.14.7
118
+
119
+ ### Patch Changes
120
+
121
+ - Updated dependencies []:
122
+ - @atlaspack/utils@2.14.7
123
+ - @atlaspack/plugin@2.14.7
124
+
125
+ ## 2.14.6
126
+
127
+ ### Patch Changes
128
+
129
+ - Updated dependencies []:
130
+ - @atlaspack/utils@2.14.6
131
+ - @atlaspack/plugin@2.14.6
132
+
3
133
  ## 2.14.5
4
134
 
5
135
  ### Patch Changes
@@ -0,0 +1,3 @@
1
+ import { Transformer } from '@atlaspack/plugin';
2
+ declare const _default: Transformer<unknown>;
3
+ export default _default;
@@ -41,6 +41,7 @@ function _utils() {
41
41
  }
42
42
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
43
43
  // https://developer.mozilla.org/en-US/docs/Web/Manifest
44
+
44
45
  const RESOURCES_SCHEMA = {
45
46
  type: 'array',
46
47
  items: {
@@ -48,6 +49,7 @@ const RESOURCES_SCHEMA = {
48
49
  properties: {
49
50
  src: {
50
51
  type: 'string',
52
+ // @ts-expect-error TS7006
51
53
  __validate: s => {
52
54
  if (s.length === 0) {
53
55
  return 'Must not be empty';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/transformer-webmanifest",
3
- "version": "2.14.5-canary.14+267b0d591",
3
+ "version": "2.14.5-canary.141+2f29297bd",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,15 +9,19 @@
9
9
  "type": "git",
10
10
  "url": "https://github.com/atlassian-labs/atlaspack.git"
11
11
  },
12
- "main": "lib/WebManifestTransformer.js",
13
- "source": "src/WebManifestTransformer.js",
12
+ "main": "./lib/WebManifestTransformer.js",
13
+ "source": "./src/WebManifestTransformer.ts",
14
+ "types": "./lib/WebManifestTransformer.d.ts",
14
15
  "engines": {},
15
16
  "dependencies": {
16
- "@atlaspack/diagnostic": "2.14.1-canary.82+267b0d591",
17
- "@atlaspack/plugin": "2.14.5-canary.14+267b0d591",
18
- "@atlaspack/utils": "2.14.5-canary.14+267b0d591",
17
+ "@atlaspack/diagnostic": "2.14.1-canary.209+2f29297bd",
18
+ "@atlaspack/plugin": "2.14.5-canary.141+2f29297bd",
19
+ "@atlaspack/utils": "2.14.5-canary.141+2f29297bd",
19
20
  "@mischnic/json-sourcemap": "^0.1.0"
20
21
  },
21
22
  "type": "commonjs",
22
- "gitHead": "267b0d59131c00e4cd1526bbf87aa84b9c8fd411"
23
- }
23
+ "scripts": {
24
+ "check-ts": "tsc --emitDeclarationOnly --rootDir src"
25
+ },
26
+ "gitHead": "2f29297bd550840c9840871559349ef773bcbf6d"
27
+ }
@@ -1,4 +1,3 @@
1
- // @flow
2
1
  // https://developer.mozilla.org/en-US/docs/Web/Manifest
3
2
  import type {SchemaEntity} from '@atlaspack/utils';
4
3
 
@@ -15,6 +14,7 @@ const RESOURCES_SCHEMA = {
15
14
  properties: {
16
15
  src: {
17
16
  type: 'string',
17
+ // @ts-expect-error TS7006
18
18
  __validate: (s) => {
19
19
  if (s.length === 0) {
20
20
  return 'Must not be empty';
@@ -24,7 +24,7 @@ const RESOURCES_SCHEMA = {
24
24
  },
25
25
  required: ['src'],
26
26
  },
27
- };
27
+ } as const;
28
28
  const MANIFEST_SCHEMA: SchemaEntity = {
29
29
  type: 'object',
30
30
  properties: {
@@ -51,7 +51,7 @@ const MANIFEST_SCHEMA: SchemaEntity = {
51
51
  },
52
52
  };
53
53
 
54
- export default (new Transformer({
54
+ export default new Transformer({
55
55
  async transform({asset}) {
56
56
  const source = await asset.getCode();
57
57
  const {data, pointers} = parse(source);
@@ -63,7 +63,7 @@ export default (new Transformer({
63
63
  'Invalid webmanifest',
64
64
  );
65
65
 
66
- function addResourceListToAsset(list, parent) {
66
+ function addResourceListToAsset(list: any, parent: string) {
67
67
  if (list) {
68
68
  invariant(Array.isArray(list));
69
69
  for (let i = 0; i < list.length; i++) {
@@ -101,4 +101,4 @@ export default (new Transformer({
101
101
  asset.setCode(JSON.stringify(data));
102
102
  return [asset];
103
103
  },
104
- }): Transformer);
104
+ }) as Transformer<unknown>;
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": ["src"]
4
+ }