bare-module 4.8.5 → 4.8.6
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/index.js +7 -4
- package/package.json +1 -1
- 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/win32-arm64/bare-module.bare +0 -0
- package/prebuilds/win32-x64/bare-module.bare +0 -0
package/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* global Bare */
|
|
2
1
|
const path = require('bare-path')
|
|
3
2
|
const resolve = require('bare-module-resolve')
|
|
4
3
|
const lex = require('bare-module-lexer')
|
|
@@ -979,7 +978,9 @@ Module._protocol = new Protocol({
|
|
|
979
978
|
postresolve(url) {
|
|
980
979
|
switch (url.protocol) {
|
|
981
980
|
case 'file:':
|
|
982
|
-
return pathToFileURL(
|
|
981
|
+
return pathToFileURL(
|
|
982
|
+
binding.realpath(path.toNamespacedPath(fileURLToPath(url)))
|
|
983
|
+
)
|
|
983
984
|
default:
|
|
984
985
|
return url
|
|
985
986
|
}
|
|
@@ -989,7 +990,7 @@ Module._protocol = new Protocol({
|
|
|
989
990
|
switch (url.protocol) {
|
|
990
991
|
case 'file:':
|
|
991
992
|
return binding.exists(
|
|
992
|
-
fileURLToPath(url),
|
|
993
|
+
path.toNamespacedPath(fileURLToPath(url)),
|
|
993
994
|
type === constants.types.ASSET
|
|
994
995
|
? binding.FILE | binding.DIR
|
|
995
996
|
: binding.FILE
|
|
@@ -1002,7 +1003,9 @@ Module._protocol = new Protocol({
|
|
|
1002
1003
|
read(url) {
|
|
1003
1004
|
switch (url.protocol) {
|
|
1004
1005
|
case 'file:':
|
|
1005
|
-
return Buffer.from(
|
|
1006
|
+
return Buffer.from(
|
|
1007
|
+
binding.read(path.toNamespacedPath(fileURLToPath(url)))
|
|
1008
|
+
)
|
|
1006
1009
|
default:
|
|
1007
1010
|
throw errors.UNKNOWN_PROTOCOL(`Cannot load module '${url.href}'`)
|
|
1008
1011
|
}
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|