@hyperframes/lint 0.8.150 → 0.8.152
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/dist/browser.js +1 -1
- package/dist/index.js +9 -8
- package/package.json +2 -2
package/dist/browser.js
CHANGED
|
@@ -3718,7 +3718,7 @@ var SCENE_BOUNDARY_EPSILON_SECONDS = 0.05;
|
|
|
3718
3718
|
var UNRESOLVED_TARGET = "__unresolved__";
|
|
3719
3719
|
function targetHasNoStableIdentity(selector, identity) {
|
|
3720
3720
|
if (identity) return false;
|
|
3721
|
-
return selector === UNRESOLVED_TARGET || selector === "dwell/hold" || selector.startsWith("proxy
|
|
3721
|
+
return selector === UNRESOLVED_TARGET || selector === "dwell/hold" || selector.startsWith("proxy ");
|
|
3722
3722
|
}
|
|
3723
3723
|
function unwrapRaw(value) {
|
|
3724
3724
|
if (typeof value === "number") return value;
|
package/dist/index.js
CHANGED
|
@@ -3724,7 +3724,7 @@ var SCENE_BOUNDARY_EPSILON_SECONDS = 0.05;
|
|
|
3724
3724
|
var UNRESOLVED_TARGET = "__unresolved__";
|
|
3725
3725
|
function targetHasNoStableIdentity(selector, identity) {
|
|
3726
3726
|
if (identity) return false;
|
|
3727
|
-
return selector === UNRESOLVED_TARGET || selector === "dwell/hold" || selector.startsWith("proxy
|
|
3727
|
+
return selector === UNRESOLVED_TARGET || selector === "dwell/hold" || selector.startsWith("proxy ");
|
|
3728
3728
|
}
|
|
3729
3729
|
function unwrapRaw(value) {
|
|
3730
3730
|
if (typeof value === "number") return value;
|
|
@@ -6736,6 +6736,9 @@ var MASK_IMAGE_URL_RE = /\b(?:-webkit-)?mask-image\s*:\s*[^;{}]*url\(\s*(?:"([^"
|
|
|
6736
6736
|
function isLocalStylesheetHref(href) {
|
|
6737
6737
|
return !!href && !/^(https?:|data:|blob:|\/\/)/i.test(href);
|
|
6738
6738
|
}
|
|
6739
|
+
function staysInsideProjectRoot(href) {
|
|
6740
|
+
return !href.startsWith("/") && !href.split("/").includes("..");
|
|
6741
|
+
}
|
|
6739
6742
|
function collectLocalStylesheets(projectDir, document, compSrcPath) {
|
|
6740
6743
|
const styles = [];
|
|
6741
6744
|
for (const link of querySelectorAllIncludingTemplates(document, "link")) {
|
|
@@ -6743,14 +6746,12 @@ function collectLocalStylesheets(projectDir, document, compSrcPath) {
|
|
|
6743
6746
|
if (!rel.split(/\s+/).some((part) => part.toLowerCase() === "stylesheet")) continue;
|
|
6744
6747
|
const href = link.getAttribute("href") ?? "";
|
|
6745
6748
|
if (!isLocalStylesheetHref(href)) continue;
|
|
6746
|
-
const
|
|
6747
|
-
const stylesheet = resolveExistingLocalAsset2(projectDir,
|
|
6749
|
+
const besideFile = compSrcPath ? join2(dirname(compSrcPath), href) : href;
|
|
6750
|
+
const stylesheet = resolveExistingLocalAsset2(projectDir, besideFile) ?? (compSrcPath && staysInsideProjectRoot(href) ? resolveExistingLocalAsset2(projectDir, href) : null);
|
|
6748
6751
|
if (!stylesheet) continue;
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
rootRelativePath: stylesheet.rootRelativePath
|
|
6753
|
-
});
|
|
6752
|
+
const read = readProjectFile(stylesheet.resolved);
|
|
6753
|
+
if (read.kind !== "file") continue;
|
|
6754
|
+
styles.push({ href, content: read.text, rootRelativePath: stylesheet.rootRelativePath });
|
|
6754
6755
|
}
|
|
6755
6756
|
return styles;
|
|
6756
6757
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/lint",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.152",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/heygen-com/hyperframes",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"linkedom": "^0.18.12",
|
|
36
36
|
"postcss": "^8.5.8",
|
|
37
37
|
"postcss-selector-parser": "^7.1.4",
|
|
38
|
-
"@hyperframes/parsers": "0.8.
|
|
38
|
+
"@hyperframes/parsers": "0.8.152"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^25.0.10",
|