bare-module 6.1.3 → 6.2.1
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/README.md +8 -0
- package/index.js +3 -0
- package/package.json +6 -3
- package/prebuilds/android-arm/bare-module.bare +0 -0
- package/prebuilds/android-arm64/bare-module.bare +0 -0
- package/prebuilds/android-ia32/bare-module.bare +0 -0
- package/prebuilds/android-x64/bare-module.bare +0 -0
- package/prebuilds/darwin-arm64/bare-module.bare +0 -0
- package/prebuilds/darwin-x64/bare-module.bare +0 -0
- package/prebuilds/ios-arm64/bare-module.bare +0 -0
- package/prebuilds/ios-arm64-simulator/bare-module.bare +0 -0
- package/prebuilds/ios-x64-simulator/bare-module.bare +0 -0
- package/prebuilds/linux-arm64/bare-module.bare +0 -0
- package/prebuilds/linux-x64/bare-module.bare +0 -0
- package/prebuilds/win32-arm64/bare-module.bare +0 -0
- package/prebuilds/win32-x64/bare-module.bare +0 -0
package/README.md
CHANGED
|
@@ -540,6 +540,14 @@ A boolean representing whether the current module is the entry script where the
|
|
|
540
540
|
|
|
541
541
|
A cache of loaded modules for this module. The same value as `module.cache` for the current module.
|
|
542
542
|
|
|
543
|
+
#### `import.meta.dirname`
|
|
544
|
+
|
|
545
|
+
The directory name of the current module.
|
|
546
|
+
|
|
547
|
+
#### `import.meta.filename`
|
|
548
|
+
|
|
549
|
+
The file name of the current module.
|
|
550
|
+
|
|
543
551
|
#### `const href = import.meta.resolve(specifier[, parentURL])`
|
|
544
552
|
|
|
545
553
|
A module-relative resolution function which returns the URL string for the module. The `specifier` is a string which is resolved relative to the `parentURL` which is a WHATWG URL.
|
package/index.js
CHANGED
|
@@ -323,6 +323,9 @@ module.exports = exports = class Module {
|
|
|
323
323
|
meta.main = module._main === module
|
|
324
324
|
meta.cache = module._cache
|
|
325
325
|
|
|
326
|
+
meta.dirname = module.dirname // For Node.js compatibility
|
|
327
|
+
meta.filename = module.filename // For Node.js compatibility
|
|
328
|
+
|
|
326
329
|
meta.resolve = function resolve(specifier, parentURL = referrer._url) {
|
|
327
330
|
return self.resolve(specifier, toURL(parentURL, referrer._url), {
|
|
328
331
|
referrer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bare-module",
|
|
3
|
-
"version": "6.1
|
|
3
|
+
"version": "6.2.1",
|
|
4
4
|
"description": "Module support for JavaScript",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
],
|
|
21
21
|
"addon": true,
|
|
22
22
|
"scripts": {
|
|
23
|
-
"
|
|
23
|
+
"format": "prettier --write . && lunte --fix",
|
|
24
|
+
"lint": "prettier --check . && lunte",
|
|
25
|
+
"test": "brittle-bare --coverage test.js"
|
|
24
26
|
},
|
|
25
27
|
"repository": {
|
|
26
28
|
"type": "git",
|
|
@@ -33,7 +35,7 @@
|
|
|
33
35
|
},
|
|
34
36
|
"homepage": "https://github.com/holepunchto/bare-module#readme",
|
|
35
37
|
"engines": {
|
|
36
|
-
"bare": ">=1.23.0"
|
|
38
|
+
"bare": ">=1.23.0 <1.29.0"
|
|
37
39
|
},
|
|
38
40
|
"dependencies": {
|
|
39
41
|
"bare-bundle": "^1.3.0",
|
|
@@ -46,6 +48,7 @@
|
|
|
46
48
|
"bare-buffer": "^3.0.2",
|
|
47
49
|
"brittle": "^3.1.1",
|
|
48
50
|
"cmake-bare": "^1.1.6",
|
|
51
|
+
"lunte": "^1.6.0",
|
|
49
52
|
"prettier": "^3.3.3",
|
|
50
53
|
"prettier-config-holepunch": "^2.0.0"
|
|
51
54
|
},
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|