@markuplint/rules 5.0.0-alpha.3 → 5.0.0-rc.0
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 +7 -0
- package/lib/index.d.ts +2 -2
- package/lib/no-unsupported-features/compat-data.js +13 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.0.0-rc.0](https://github.com/markuplint/markuplint/compare/v5.0.0-alpha.3...v5.0.0-rc.0) (2026-03-12)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **rules:** update ARIA version default from 1.2 to 1.3 in schema.json ([f25185f](https://github.com/markuplint/markuplint/commit/f25185f124815a2a51666e8b326ba59baf2c8c93))
|
|
11
|
+
- **rules:** use forLegacyNode import for BCD to fix ERR_IMPORT_ATTRIBUTE_MISSING ([53f236e](https://github.com/markuplint/markuplint/commit/53f236e1e73d6dca569d7602a1d3e31e42bd0461)), closes [#3328](https://github.com/markuplint/markuplint/issues/3328)
|
|
12
|
+
|
|
6
13
|
# [5.0.0-alpha.3](https://github.com/markuplint/markuplint/compare/v5.0.0-alpha.2...v5.0.0-alpha.3) (2026-02-26)
|
|
7
14
|
|
|
8
15
|
### Bug Fixes
|
package/lib/index.d.ts
CHANGED
|
@@ -15,8 +15,8 @@ declare const rules: {
|
|
|
15
15
|
readonly 'attr-order': Readonly<import("@markuplint/ml-core").RuleSeed<(string | {
|
|
16
16
|
name?: string;
|
|
17
17
|
pattern?: string;
|
|
18
|
-
group?: "
|
|
19
|
-
order?:
|
|
18
|
+
group?: "data" | "global" | "event" | "aria" | "spread";
|
|
19
|
+
order?: string[] | "alphabetical" | "source-order";
|
|
20
20
|
})[], {
|
|
21
21
|
alphabetical?: boolean;
|
|
22
22
|
}>>;
|
|
@@ -24,12 +24,24 @@ let bcdPromise;
|
|
|
24
24
|
* at startup, even when this rule is disabled. Dynamic import defers the
|
|
25
25
|
* cost until the rule actually runs.
|
|
26
26
|
*
|
|
27
|
+
* Uses `forLegacyNode` to avoid `ERR_IMPORT_ATTRIBUTE_MISSING` on Node.js >= 22.
|
|
28
|
+
* The main entry (`@mdn/browser-compat-data`) points directly to `data.json`,
|
|
29
|
+
* which requires `import ... with { type: "json" }` on Node.js >= 22.
|
|
30
|
+
* The `forLegacyNode` wrapper uses `fs.readFileSync` instead, compatible
|
|
31
|
+
* with all Node.js versions.
|
|
32
|
+
*
|
|
33
|
+
* NOTE: If `forLegacyNode` is removed in a future BCD version, migrate to:
|
|
34
|
+
* `import('...', { with: { type: 'json' } })`
|
|
35
|
+
* once the minimum supported Node.js version supports import attributes.
|
|
36
|
+
*
|
|
27
37
|
* Uses a Promise-based cache to prevent race conditions when multiple
|
|
28
38
|
* concurrent calls trigger the import simultaneously.
|
|
29
39
|
*/
|
|
30
40
|
function loadBcd() {
|
|
31
41
|
if (!bcdPromise) {
|
|
32
|
-
|
|
42
|
+
// `?? mod` is a defensive fallback for CJS interop environments
|
|
43
|
+
// where `default` may not be set on the module namespace object.
|
|
44
|
+
bcdPromise = import('@mdn/browser-compat-data/forLegacyNode').then(mod => mod.default ?? mod);
|
|
33
45
|
}
|
|
34
46
|
return bcdPromise;
|
|
35
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/rules",
|
|
3
|
-
"version": "5.0.0-
|
|
3
|
+
"version": "5.0.0-rc.0",
|
|
4
4
|
"description": "Built-in rules of markuplint",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"./lib/permitted-contents/debug.js": "./lib/permitted-contents/debug.browser.js"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@markuplint/html-spec": "5.0.0-
|
|
31
|
-
"@markuplint/ml-core": "5.0.0-
|
|
32
|
-
"@markuplint/ml-spec": "5.0.0-
|
|
33
|
-
"@markuplint/selector": "5.0.0-
|
|
34
|
-
"@markuplint/shared": "5.0.0-
|
|
35
|
-
"@markuplint/types": "5.0.0-
|
|
30
|
+
"@markuplint/html-spec": "5.0.0-rc.0",
|
|
31
|
+
"@markuplint/ml-core": "5.0.0-rc.0",
|
|
32
|
+
"@markuplint/ml-spec": "5.0.0-rc.0",
|
|
33
|
+
"@markuplint/selector": "5.0.0-rc.0",
|
|
34
|
+
"@markuplint/shared": "5.0.0-rc.0",
|
|
35
|
+
"@markuplint/types": "5.0.0-rc.0",
|
|
36
36
|
"@mdn/browser-compat-data": "^7.3.2",
|
|
37
37
|
"@types/debug": "4.1.12",
|
|
38
38
|
"ansi-colors": "4.1.3",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"image-size": "^2.0.2",
|
|
43
43
|
"type-fest": "5.4.4"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "ebf4d7cfca0c259aead3b292c6b8a202db4cd802"
|
|
46
46
|
}
|