@atlaspack/packager-xml 2.14.5-canary.19 → 2.14.5-canary.190

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,209 @@
1
1
  # @atlaspack/packager-xml
2
2
 
3
+ ## 2.14.29
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @atlaspack/utils@2.19.1
9
+ - @atlaspack/plugin@2.14.29
10
+ - @atlaspack/types@2.15.19
11
+
12
+ ## 2.14.28
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [[`f0349a6`](https://github.com/atlassian-labs/atlaspack/commit/f0349a6b9b04755088f121095ca6301a2ada3767)]:
17
+ - @atlaspack/utils@2.19.0
18
+ - @atlaspack/plugin@2.14.28
19
+ - @atlaspack/types@2.15.18
20
+
21
+ ## 2.14.27
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies []:
26
+ - @atlaspack/utils@2.18.4
27
+ - @atlaspack/plugin@2.14.27
28
+ - @atlaspack/types@2.15.17
29
+
30
+ ## 2.14.26
31
+
32
+ ### Patch Changes
33
+
34
+ - [#742](https://github.com/atlassian-labs/atlaspack/pull/742) [`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd) Thanks [@yamadapc](https://github.com/yamadapc)! - Internal changes and bug fixes to environmentDeduplication flag
35
+
36
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd), [`889c65c`](https://github.com/atlassian-labs/atlaspack/commit/889c65cd25b811045e26a117e7404f694dde77a2)]:
37
+ - @atlaspack/plugin@2.14.26
38
+ - @atlaspack/types@2.15.16
39
+ - @atlaspack/utils@2.18.3
40
+
41
+ ## 2.14.25
42
+
43
+ ### Patch Changes
44
+
45
+ - Updated dependencies []:
46
+ - @atlaspack/utils@2.18.2
47
+ - @atlaspack/plugin@2.14.25
48
+ - @atlaspack/types@2.15.15
49
+
50
+ ## 2.14.24
51
+
52
+ ### Patch Changes
53
+
54
+ - Updated dependencies []:
55
+ - @atlaspack/utils@2.18.1
56
+ - @atlaspack/plugin@2.14.24
57
+ - @atlaspack/types@2.15.14
58
+
59
+ ## 2.14.23
60
+
61
+ ### Patch Changes
62
+
63
+ - Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
64
+ - @atlaspack/utils@2.18.0
65
+ - @atlaspack/types@2.15.13
66
+ - @atlaspack/plugin@2.14.23
67
+
68
+ ## 2.14.22
69
+
70
+ ### Patch Changes
71
+
72
+ - [#720](https://github.com/atlassian-labs/atlaspack/pull/720) [`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94) Thanks [@alshdavid](https://github.com/alshdavid)! - Migrate to TypeScript
73
+
74
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
75
+ - @atlaspack/plugin@2.14.22
76
+ - @atlaspack/types@2.15.12
77
+ - @atlaspack/utils@2.17.4
78
+
79
+ ## 2.14.21
80
+
81
+ ### Patch Changes
82
+
83
+ - Updated dependencies []:
84
+ - @atlaspack/types@2.15.11
85
+ - @atlaspack/utils@2.17.3
86
+ - @atlaspack/plugin@2.14.21
87
+
88
+ ## 2.14.20
89
+
90
+ ### Patch Changes
91
+
92
+ - [#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
93
+
94
+ - Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
95
+ - @atlaspack/plugin@2.14.20
96
+ - @atlaspack/utils@2.17.2
97
+ - @atlaspack/types@2.15.10
98
+
99
+ ## 2.14.19
100
+
101
+ ### Patch Changes
102
+
103
+ - Updated dependencies []:
104
+ - @atlaspack/utils@2.17.1
105
+ - @atlaspack/types@2.15.9
106
+ - @atlaspack/plugin@2.14.19
107
+
108
+ ## 2.14.18
109
+
110
+ ### Patch Changes
111
+
112
+ - 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)]:
113
+ - @atlaspack/utils@2.17.0
114
+ - @atlaspack/types@2.15.8
115
+ - @atlaspack/plugin@2.14.18
116
+
117
+ ## 2.14.17
118
+
119
+ ### Patch Changes
120
+
121
+ - Updated dependencies []:
122
+ - @atlaspack/utils@2.16.1
123
+ - @atlaspack/types@2.15.7
124
+ - @atlaspack/plugin@2.14.17
125
+
126
+ ## 2.14.16
127
+
128
+ ### Patch Changes
129
+
130
+ - Updated dependencies [[`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
131
+ - @atlaspack/utils@2.16.0
132
+ - @atlaspack/types@2.15.6
133
+ - @atlaspack/plugin@2.14.16
134
+
135
+ ## 2.14.15
136
+
137
+ ### Patch Changes
138
+
139
+ - Updated dependencies []:
140
+ - @atlaspack/utils@2.15.3
141
+ - @atlaspack/types@2.15.5
142
+ - @atlaspack/plugin@2.14.15
143
+
144
+ ## 2.14.14
145
+
146
+ ### Patch Changes
147
+
148
+ - Updated dependencies []:
149
+ - @atlaspack/utils@2.15.2
150
+ - @atlaspack/types@2.15.4
151
+ - @atlaspack/plugin@2.14.14
152
+
153
+ ## 2.14.13
154
+
155
+ ### Patch Changes
156
+
157
+ - Updated dependencies []:
158
+ - @atlaspack/types@2.15.3
159
+ - @atlaspack/utils@2.15.1
160
+ - @atlaspack/plugin@2.14.13
161
+
162
+ ## 2.14.12
163
+
164
+ ### Patch Changes
165
+
166
+ - Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
167
+ - @atlaspack/utils@2.15.0
168
+ - @atlaspack/types@2.15.2
169
+ - @atlaspack/plugin@2.14.12
170
+
171
+ ## 2.14.11
172
+
173
+ ### Patch Changes
174
+
175
+ - Updated dependencies []:
176
+ - @atlaspack/utils@2.14.11
177
+ - @atlaspack/types@2.15.1
178
+ - @atlaspack/plugin@2.14.11
179
+
180
+ ## 2.14.10
181
+
182
+ ### Patch Changes
183
+
184
+ - Updated dependencies [[`51aba5f`](https://github.com/atlassian-labs/atlaspack/commit/51aba5fc0e49235ee06bbc3c376f48c3e7da5c4b), [`1e32d4e`](https://github.com/atlassian-labs/atlaspack/commit/1e32d4eae6b3af3968e8a0ef97d35b4347fd4196)]:
185
+ - @atlaspack/types@2.15.0
186
+ - @atlaspack/plugin@2.14.10
187
+ - @atlaspack/utils@2.14.10
188
+
189
+ ## 2.14.9
190
+
191
+ ### Patch Changes
192
+
193
+ - Updated dependencies []:
194
+ - @atlaspack/utils@2.14.9
195
+ - @atlaspack/types@2.14.9
196
+ - @atlaspack/plugin@2.14.9
197
+
198
+ ## 2.14.8
199
+
200
+ ### Patch Changes
201
+
202
+ - Updated dependencies []:
203
+ - @atlaspack/utils@2.14.8
204
+ - @atlaspack/types@2.14.8
205
+ - @atlaspack/plugin@2.14.8
206
+
3
207
  ## 2.14.7
4
208
 
5
209
  ### Patch Changes
@@ -39,6 +39,7 @@ var _default = exports.default = new (_plugin().Packager)({
39
39
  bundleGraph,
40
40
  getInlineBundleContents
41
41
  }) {
42
+ // @ts-expect-error TS2552
42
43
  const assets = [];
43
44
  bundle.traverseAssets(asset => {
44
45
  assets.push(asset);
@@ -62,10 +63,13 @@ var _default = exports.default = new (_plugin().Packager)({
62
63
  let parsed = new (_xmldom().DOMParser)().parseFromString(contents, 'application/xml');
63
64
  if (parsed.documentElement != null) {
64
65
  let parent = element.parentNode;
66
+ // @ts-expect-error TS18047
65
67
  parent.removeChild(element);
68
+ // @ts-expect-error TS18047
66
69
  parent.appendChild(parsed.documentElement);
67
70
  }
68
71
  } else {
72
+ // @ts-expect-error TS18047
69
73
  element.parentNode.textContent = contents;
70
74
  }
71
75
  }
@@ -0,0 +1,3 @@
1
+ import { Packager } from '@atlaspack/plugin';
2
+ declare const _default: Packager<unknown, unknown>;
3
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/packager-xml",
3
- "version": "2.14.5-canary.19+a63b1da4d",
3
+ "version": "2.14.5-canary.190+7a52bab62",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,17 +9,22 @@
9
9
  "type": "git",
10
10
  "url": "https://github.com/atlassian-labs/atlaspack.git"
11
11
  },
12
- "main": "lib/XMLPackager.js",
13
- "source": "src/XMLPackager.js",
12
+ "main": "./lib/XMLPackager.js",
13
+ "source": "./src/XMLPackager.ts",
14
+ "types": "./lib/XMLPackager.d.ts",
14
15
  "engines": {
15
16
  "node": ">= 16.0.0"
16
17
  },
17
18
  "dependencies": {
18
- "@atlaspack/plugin": "2.14.5-canary.19+a63b1da4d",
19
- "@atlaspack/types": "2.14.5-canary.19+a63b1da4d",
20
- "@atlaspack/utils": "2.14.5-canary.19+a63b1da4d",
19
+ "@atlaspack/plugin": "2.14.5-canary.190+7a52bab62",
20
+ "@atlaspack/types": "2.14.5-canary.190+7a52bab62",
21
+ "@atlaspack/utils": "2.14.5-canary.190+7a52bab62",
21
22
  "@xmldom/xmldom": "^0.7.9"
22
23
  },
23
24
  "type": "commonjs",
24
- "gitHead": "a63b1da4d98a7eda8a2130700dc844a56aa8308e"
25
- }
25
+ "scripts": {
26
+ "check-ts": "tsc --emitDeclarationOnly --rootDir src",
27
+ "build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
28
+ },
29
+ "gitHead": "7a52bab6281e8edbfa66af248eb6f872c6b4b7bd"
30
+ }
@@ -1,5 +1,3 @@
1
- // @flow
2
-
3
1
  import type {Bundle, BundleGraph, NamedBundle} from '@atlaspack/types';
4
2
  import assert from 'assert';
5
3
  import {Packager} from '@atlaspack/plugin';
@@ -10,9 +8,10 @@ import {
10
8
  } from '@atlaspack/utils';
11
9
  import {DOMParser, XMLSerializer} from '@xmldom/xmldom';
12
10
 
13
- export default (new Packager({
11
+ export default new Packager({
14
12
  async package({bundle, bundleGraph, getInlineBundleContents}) {
15
- const assets = [];
13
+ // @ts-expect-error TS2552
14
+ const assets: Array<Asset> = [];
16
15
  bundle.traverseAssets((asset) => {
17
16
  assets.push(asset);
18
17
  });
@@ -55,10 +54,13 @@ export default (new Packager({
55
54
  );
56
55
  if (parsed.documentElement != null) {
57
56
  let parent = element.parentNode;
57
+ // @ts-expect-error TS18047
58
58
  parent.removeChild(element);
59
+ // @ts-expect-error TS18047
59
60
  parent.appendChild(parsed.documentElement);
60
61
  }
61
62
  } else {
63
+ // @ts-expect-error TS18047
62
64
  element.parentNode.textContent = contents;
63
65
  }
64
66
  }
@@ -86,14 +88,20 @@ export default (new Packager({
86
88
  map,
87
89
  });
88
90
  },
89
- }): Packager);
91
+ }) as Packager<unknown, unknown>;
90
92
 
91
93
  async function getAssetContent(
92
94
  bundleGraph: BundleGraph<NamedBundle>,
93
- getInlineBundleContents,
94
- assetId,
95
+ getInlineBundleContents: (
96
+ arg1: Bundle,
97
+ arg2: BundleGraph<NamedBundle>,
98
+ // @ts-expect-error TS2304
99
+ ) => Async<{
100
+ contents: Blob;
101
+ }>,
102
+ assetId: any,
95
103
  ) {
96
- let inlineBundle: ?Bundle;
104
+ let inlineBundle: Bundle | null | undefined;
97
105
  bundleGraph.traverseBundles((bundle, context, {stop}) => {
98
106
  const entryAssets = bundle.getEntryAssets();
99
107
  if (entryAssets.some((a) => a.uniqueKey === assetId)) {
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": ["src"]
4
+ }