Skip to content

Commit 7547424

Browse files
refactor: modernize package.json and fix CJS/ESM warnings
- Use pkg.exports instead of pkg.main (modern standard) - Update repository URL to full git URL format - Rename CJS files in fixtures to .cjs extension - Update fixture documentation references
1 parent cac6dd1 commit 7547424

5 files changed

Lines changed: 6 additions & 4 deletions

File tree

fixtures/modules/synthetic-jquery-local/FIXTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Triggers the local jQuery detection and outdated version warning.
88

99
| Rule ID | Trigger file | Notes |
1010
| ------- | ------------ | ----- |
11-
| detect-jquery-local-copy | `public/js/jquery.min.js` | Local minified jQuery copy is checked in. |
11+
| detect-jquery-local-copy | `public/js/jquery.min.cjs` | Local minified jQuery copy is checked in. |
1212

1313
Additional behaviour: because the minified file lacks any `jQuery v3.7` marker, the stage should also flag the copy as outdated.
1414

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Local jQuery Fixture
22

3-
A tiny placeholder file mimics a checked-in `jquery.min.js` so the harness can ensure both the "local copy" and "outdated version" messages fire.
3+
A tiny placeholder file mimics a checked-in `jquery.min.cjs` so the harness can ensure both the "local copy" and "outdated version" messages fire.

fixtures/modules/synthetic-jquery-local/public/js/jquery.min.js renamed to fixtures/modules/synthetic-jquery-local/public/js/jquery.min.cjs

File renamed without changes.

fixtures/modules/synthetic-readme-heuristics/node_modules/left-pad/index.js renamed to fixtures/modules/synthetic-readme-heuristics/node_modules/left-pad/index.cjs

File renamed without changes.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@
1212
},
1313
"repository": {
1414
"type": "git",
15-
"url": "https://github.com/MagicMirrorOrg/MagicMirror-3rd-Party-Modules"
15+
"url": "git+https://github.com/MagicMirrorOrg/MagicMirror-3rd-Party-Modules.git"
1616
},
1717
"license": "MIT",
1818
"author": {
1919
"name": "Kristjan ESPERANTO",
2020
"url": "https://github.com/KristjanESPERANTO"
2121
},
2222
"type": "module",
23-
"main": "scripts/collect-metadata/index.js",
23+
"exports": {
24+
".": "./scripts/collect-metadata/index.js"
25+
},
2426
"directories": {
2527
"doc": "docs"
2628
},

0 commit comments

Comments
 (0)