@atlaspack/transformer-svg 2.12.1-dev.3368 → 2.12.1-dev.3401

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/lib/inline.js CHANGED
@@ -75,26 +75,26 @@ function extractInlineAssets(asset, ast) {
75
75
 
76
76
  // Inform packager to remove type, since CSS and JS are the defaults.
77
77
  delete attrs.type;
78
- let atlaspackKey;
78
+ let parcelKey;
79
79
  // allow a script/style tag to declare its key
80
- if (attrs['data-atlaspack-key']) {
81
- atlaspackKey = attrs['data-atlaspack-key'];
80
+ if (attrs['data-parcel-key']) {
81
+ parcelKey = attrs['data-parcel-key'];
82
82
  } else {
83
- atlaspackKey = (0, _rust().hashString)(`${asset.id}:${key++}`);
83
+ parcelKey = (0, _rust().hashString)(`${asset.id}:${key++}`);
84
84
  }
85
85
 
86
- // insert atlaspackId to allow us to retrieve node during packaging
87
- attrs['data-atlaspack-key'] = atlaspackKey;
86
+ // insert parcelId to allow us to retrieve node during packaging
87
+ attrs['data-parcel-key'] = parcelKey;
88
88
  asset.setAST(ast); // mark dirty
89
89
 
90
90
  asset.addDependency({
91
- specifier: atlaspackKey,
91
+ specifier: parcelKey,
92
92
  specifierType: 'esm'
93
93
  });
94
94
  parts.push({
95
95
  type,
96
96
  content: value,
97
- uniqueKey: atlaspackKey,
97
+ uniqueKey: parcelKey,
98
98
  bundleBehavior: 'inline',
99
99
  env,
100
100
  meta: {
@@ -110,9 +110,9 @@ function extractInlineAssets(asset, ast) {
110
110
  let attrs = node.attrs;
111
111
  let style = attrs === null || attrs === void 0 ? void 0 : attrs.style;
112
112
  if (attrs != null && style != null) {
113
- let atlaspackKey = (0, _rust().hashString)(`${asset.id}:${key++}`);
113
+ let parcelKey = (0, _rust().hashString)(`${asset.id}:${key++}`);
114
114
  attrs.style = asset.addDependency({
115
- specifier: atlaspackKey,
115
+ specifier: parcelKey,
116
116
  specifierType: 'esm'
117
117
  });
118
118
  asset.setAST(ast); // mark dirty
@@ -120,7 +120,7 @@ function extractInlineAssets(asset, ast) {
120
120
  parts.push({
121
121
  type: 'css',
122
122
  content: style,
123
- uniqueKey: atlaspackKey,
123
+ uniqueKey: parcelKey,
124
124
  bundleBehavior: 'inline',
125
125
  meta: {
126
126
  type: 'attr',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/transformer-svg",
3
- "version": "2.12.1-dev.3368+af1db7f65",
3
+ "version": "2.12.1-dev.3401+b483af77f",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -13,17 +13,17 @@
13
13
  "source": "src/SVGTransformer.js",
14
14
  "engines": {
15
15
  "node": ">= 16.0.0",
16
- "atlaspack": "^2.12.1-dev.3368+af1db7f65"
16
+ "parcel": "^2.12.1-dev.3401+b483af77f"
17
17
  },
18
18
  "dependencies": {
19
- "@atlaspack/diagnostic": "2.12.1-dev.3368+af1db7f65",
20
- "@atlaspack/plugin": "2.12.1-dev.3368+af1db7f65",
21
- "@atlaspack/rust": "2.12.1-dev.3368+af1db7f65",
19
+ "@atlaspack/diagnostic": "2.12.1-dev.3401+b483af77f",
20
+ "@atlaspack/plugin": "2.12.1-dev.3401+b483af77f",
21
+ "@atlaspack/rust": "2.12.1-dev.3401+b483af77f",
22
22
  "nullthrows": "^1.1.1",
23
23
  "posthtml": "^0.16.5",
24
24
  "posthtml-parser": "^0.10.1",
25
25
  "posthtml-render": "^3.0.0",
26
26
  "semver": "^7.5.2"
27
27
  },
28
- "gitHead": "af1db7f65c4816917ddf83716deedc536a1b8b27"
28
+ "gitHead": "b483af77f02d1258c8dad156e097b94f83671d8e"
29
29
  }
package/src/inline.js CHANGED
@@ -73,27 +73,27 @@ export default function extractInlineAssets(
73
73
  // Inform packager to remove type, since CSS and JS are the defaults.
74
74
  delete attrs.type;
75
75
 
76
- let atlaspackKey;
76
+ let parcelKey;
77
77
  // allow a script/style tag to declare its key
78
- if (attrs['data-atlaspack-key']) {
79
- atlaspackKey = attrs['data-atlaspack-key'];
78
+ if (attrs['data-parcel-key']) {
79
+ parcelKey = attrs['data-parcel-key'];
80
80
  } else {
81
- atlaspackKey = hashString(`${asset.id}:${key++}`);
81
+ parcelKey = hashString(`${asset.id}:${key++}`);
82
82
  }
83
83
 
84
- // insert atlaspackId to allow us to retrieve node during packaging
85
- attrs['data-atlaspack-key'] = atlaspackKey;
84
+ // insert parcelId to allow us to retrieve node during packaging
85
+ attrs['data-parcel-key'] = parcelKey;
86
86
  asset.setAST(ast); // mark dirty
87
87
 
88
88
  asset.addDependency({
89
- specifier: atlaspackKey,
89
+ specifier: parcelKey,
90
90
  specifierType: 'esm',
91
91
  });
92
92
 
93
93
  parts.push({
94
94
  type,
95
95
  content: value,
96
- uniqueKey: atlaspackKey,
96
+ uniqueKey: parcelKey,
97
97
  bundleBehavior: 'inline',
98
98
  env,
99
99
  meta: {
@@ -109,9 +109,9 @@ export default function extractInlineAssets(
109
109
  let attrs = node.attrs;
110
110
  let style = attrs?.style;
111
111
  if (attrs != null && style != null) {
112
- let atlaspackKey = hashString(`${asset.id}:${key++}`);
112
+ let parcelKey = hashString(`${asset.id}:${key++}`);
113
113
  attrs.style = asset.addDependency({
114
- specifier: atlaspackKey,
114
+ specifier: parcelKey,
115
115
  specifierType: 'esm',
116
116
  });
117
117
  asset.setAST(ast); // mark dirty
@@ -119,7 +119,7 @@ export default function extractInlineAssets(
119
119
  parts.push({
120
120
  type: 'css',
121
121
  content: style,
122
- uniqueKey: atlaspackKey,
122
+ uniqueKey: parcelKey,
123
123
  bundleBehavior: 'inline',
124
124
  meta: {
125
125
  type: 'attr',