@atlaspack/packager-html 2.12.1-dev.3443 → 2.12.1-dev.3478

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/packager-html",
3
- "version": "2.12.1-dev.3443+d1170cfc7",
3
+ "version": "2.12.1-dev.3478+5fd2da535",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -13,14 +13,14 @@
13
13
  "source": "src/HTMLPackager.js",
14
14
  "engines": {
15
15
  "node": ">= 16.0.0",
16
- "parcel": "^2.12.1-dev.3443+d1170cfc7"
16
+ "parcel": "^2.12.1-dev.3478+5fd2da535"
17
17
  },
18
18
  "dependencies": {
19
- "@atlaspack/plugin": "2.12.1-dev.3443+d1170cfc7",
20
- "@atlaspack/types": "2.12.1-dev.3443+d1170cfc7",
21
- "@atlaspack/utils": "2.12.1-dev.3443+d1170cfc7",
19
+ "@atlaspack/plugin": "2.12.1-dev.3478+5fd2da535",
20
+ "@atlaspack/types": "2.12.1-dev.3478+5fd2da535",
21
+ "@atlaspack/utils": "2.12.1-dev.3478+5fd2da535",
22
22
  "nullthrows": "^1.1.1",
23
23
  "posthtml": "^0.16.5"
24
24
  },
25
- "gitHead": "d1170cfc79beb290b2a066f472f68f71f7d7cb23"
25
+ "gitHead": "5fd2da535ecbe096d57e03aec15e80bb1d7601f7"
26
26
  }
@@ -48,7 +48,7 @@ export default (new Packager({
48
48
  },
49
49
  async package({bundle, bundleGraph, getInlineBundleContents, config}) {
50
50
  let assets = [];
51
- bundle.traverseAssets(asset => {
51
+ bundle.traverseAssets((asset) => {
52
52
  assets.push(asset);
53
53
  });
54
54
 
@@ -68,8 +68,8 @@ export default (new Packager({
68
68
  let renderConfig = config?.render;
69
69
 
70
70
  let {html} = await posthtml([
71
- tree => insertBundleReferences(referencedBundles, tree),
72
- tree =>
71
+ (tree) => insertBundleReferences(referencedBundles, tree),
72
+ (tree) =>
73
73
  replaceInlineAssetContent(bundleGraph, getInlineBundleContents, tree),
74
74
  ]).process(code, {
75
75
  ...renderConfig,
@@ -82,7 +82,7 @@ export default (new Packager({
82
82
  bundleGraph,
83
83
  contents: html,
84
84
  relative: false,
85
- getReplacement: contents => contents.replace(/"/g, '"'),
85
+ getReplacement: (contents) => contents.replace(/"/g, '"'),
86
86
  });
87
87
 
88
88
  return replaceInlineReferences({
@@ -107,7 +107,7 @@ async function getAssetContent(
107
107
  let inlineBundle: ?Bundle;
108
108
  bundleGraph.traverseBundles((bundle, context, {stop}) => {
109
109
  let entryAssets = bundle.getEntryAssets();
110
- if (entryAssets.some(a => a.uniqueKey === assetId)) {
110
+ if (entryAssets.some((a) => a.uniqueKey === assetId)) {
111
111
  inlineBundle = bundle;
112
112
  stop();
113
113
  }
@@ -131,7 +131,7 @@ async function replaceInlineAssetContent(
131
131
  tree,
132
132
  ) {
133
133
  const inlineNodes = [];
134
- tree.walk(node => {
134
+ tree.walk((node) => {
135
135
  if (node.attrs && node.attrs['data-parcel-key']) {
136
136
  inlineNodes.push(node);
137
137
  }
@@ -223,7 +223,7 @@ function addBundlesToTree(bundles, tree) {
223
223
 
224
224
  function find(tree, tag) {
225
225
  let res;
226
- tree.match({tag}, node => {
226
+ tree.match({tag}, (node) => {
227
227
  res = node;
228
228
  return node;
229
229
  });