@atlaspack/transformer-html
Advanced tools
Comparing version 2.12.1-dev.3367 to 2.12.1-dev.3398
@@ -38,3 +38,3 @@ "use strict"; | ||
(0, _posthtml().default)().walk.call(program, node => { | ||
let atlaspackKey = (0, _rust().hashString)(`${asset.id}:${key++}`); | ||
let parcelKey = (0, _rust().hashString)(`${asset.id}:${key++}`); | ||
if (node.tag === 'script' || node.tag === 'style') { | ||
@@ -102,4 +102,4 @@ let value = node.content && node.content.join(''); | ||
// allow a script/style tag to declare its key | ||
if (node.attrs['data-atlaspack-key']) { | ||
atlaspackKey = node.attrs['data-atlaspack-key']; | ||
if (node.attrs['data-parcel-key']) { | ||
parcelKey = node.attrs['data-parcel-key']; | ||
} | ||
@@ -112,8 +112,8 @@ | ||
// insert atlaspackId to allow us to retrieve node during packaging | ||
node.attrs['data-atlaspack-key'] = atlaspackKey; | ||
// insert parcelId to allow us to retrieve node during packaging | ||
node.attrs['data-parcel-key'] = parcelKey; | ||
asset.setAST(ast); // mark dirty | ||
asset.addDependency({ | ||
specifier: atlaspackKey, | ||
specifier: parcelKey, | ||
specifierType: 'esm' | ||
@@ -124,3 +124,3 @@ }); | ||
content: value, | ||
uniqueKey: atlaspackKey, | ||
uniqueKey: parcelKey, | ||
bundleBehavior: 'inline', | ||
@@ -146,3 +146,3 @@ env, | ||
attrs.style = asset.addDependency({ | ||
specifier: atlaspackKey, | ||
specifier: parcelKey, | ||
specifierType: 'esm' | ||
@@ -155,3 +155,3 @@ }); | ||
content: style, | ||
uniqueKey: atlaspackKey, | ||
uniqueKey: parcelKey, | ||
bundleBehavior: 'inline', | ||
@@ -158,0 +158,0 @@ meta: { |
{ | ||
"name": "@atlaspack/transformer-html", | ||
"version": "2.12.1-dev.3367+07fefed65", | ||
"version": "2.12.1-dev.3398+81c73b3cd", | ||
"license": "MIT", | ||
@@ -16,8 +16,8 @@ "publishConfig": { | ||
"node": ">= 16.0.0", | ||
"atlaspack": "^2.12.1-dev.3367+07fefed65" | ||
"parcel": "^2.12.1-dev.3398+81c73b3cd" | ||
}, | ||
"dependencies": { | ||
"@atlaspack/diagnostic": "2.12.1-dev.3367+07fefed65", | ||
"@atlaspack/plugin": "2.12.1-dev.3367+07fefed65", | ||
"@atlaspack/rust": "2.12.1-dev.3367+07fefed65", | ||
"@atlaspack/diagnostic": "2.12.1-dev.3398+81c73b3cd", | ||
"@atlaspack/plugin": "2.12.1-dev.3398+81c73b3cd", | ||
"@atlaspack/rust": "2.12.1-dev.3398+81c73b3cd", | ||
"nullthrows": "^1.1.1", | ||
@@ -30,3 +30,3 @@ "posthtml": "^0.16.5", | ||
}, | ||
"gitHead": "07fefed65a9a4d7bd0bdc9c45b39704ee4ca70dd" | ||
"gitHead": "81c73b3cdf93adf8b0013be9fed5422579bd5910" | ||
} |
@@ -34,3 +34,3 @@ // @flow strict-local | ||
PostHTML().walk.call(program, (node: PostHTMLNode) => { | ||
let atlaspackKey = hashString(`${asset.id}:${key++}`); | ||
let parcelKey = hashString(`${asset.id}:${key++}`); | ||
if (node.tag === 'script' || node.tag === 'style') { | ||
@@ -112,4 +112,4 @@ let value = node.content && node.content.join(''); | ||
// allow a script/style tag to declare its key | ||
if (node.attrs['data-atlaspack-key']) { | ||
atlaspackKey = node.attrs['data-atlaspack-key']; | ||
if (node.attrs['data-parcel-key']) { | ||
parcelKey = node.attrs['data-parcel-key']; | ||
} | ||
@@ -122,8 +122,8 @@ | ||
// insert atlaspackId to allow us to retrieve node during packaging | ||
node.attrs['data-atlaspack-key'] = atlaspackKey; | ||
// insert parcelId to allow us to retrieve node during packaging | ||
node.attrs['data-parcel-key'] = parcelKey; | ||
asset.setAST(ast); // mark dirty | ||
asset.addDependency({ | ||
specifier: atlaspackKey, | ||
specifier: parcelKey, | ||
specifierType: 'esm', | ||
@@ -135,3 +135,3 @@ }); | ||
content: value, | ||
uniqueKey: atlaspackKey, | ||
uniqueKey: parcelKey, | ||
bundleBehavior: 'inline', | ||
@@ -158,3 +158,3 @@ env, | ||
attrs.style = asset.addDependency({ | ||
specifier: atlaspackKey, | ||
specifier: parcelKey, | ||
specifierType: 'esm', | ||
@@ -167,3 +167,3 @@ }); | ||
content: style, | ||
uniqueKey: atlaspackKey, | ||
uniqueKey: parcelKey, | ||
bundleBehavior: 'inline', | ||
@@ -170,0 +170,0 @@ meta: { |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
44497