@e-mc/document 0.7.5 → 0.7.7
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 +1 -1
- package/asset.js +0 -1
- package/index.js +4 -4
- package/package.json +4 -4
package/README.md
CHANGED
package/asset.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
2
|
exports.setInitialValue = exports.isEqual = void 0;
|
|
4
3
|
function isEqual(item, other) {
|
|
5
4
|
return !!(item.id && item.id === other.id || item.uri === other.uri && item.pathname === other.pathname && item.filename === other.filename && item.pathname && item.filename);
|
package/index.js
CHANGED
|
@@ -621,14 +621,14 @@ class Document extends core_1.Client {
|
|
|
621
621
|
}
|
|
622
622
|
let result;
|
|
623
623
|
if ((value = value.trim()).startsWith('npm:')) {
|
|
624
|
+
if (!core_1.Client.enabled("node.require.npm")) {
|
|
625
|
+
return null;
|
|
626
|
+
}
|
|
624
627
|
const pkgName = value.substring(4);
|
|
625
628
|
if (persist) {
|
|
626
629
|
result = CACHE_REQUIRE[pkgName];
|
|
627
630
|
}
|
|
628
631
|
if (!result) {
|
|
629
|
-
if (!core_1.Client.enabled("node.require.npm")) {
|
|
630
|
-
return null;
|
|
631
|
-
}
|
|
632
632
|
try {
|
|
633
633
|
if (!persist) {
|
|
634
634
|
delete require.cache[pkgName];
|
|
@@ -650,7 +650,7 @@ class Document extends core_1.Client {
|
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
652
|
try {
|
|
653
|
-
const source = result || this.readFile(value, { ownPermissionOnly: true, absolutePath: this.hasEval('absolute'), requireExt: true, encoding, cache }) || value;
|
|
653
|
+
const source = (result || this.readFile(value, { ownPermissionOnly: true, absolutePath: this.hasEval('absolute'), requireExt: true, encoding: (0, types_1.getEncoding)(encoding), cache })) || value;
|
|
654
654
|
if (typeof source !== 'string') {
|
|
655
655
|
result = source;
|
|
656
656
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/document",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"description": "Document constructor for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/core": "0.7.
|
|
24
|
-
"@e-mc/db": "0.7.
|
|
25
|
-
"@e-mc/types": "0.7.
|
|
23
|
+
"@e-mc/core": "0.7.7",
|
|
24
|
+
"@e-mc/db": "0.7.7",
|
|
25
|
+
"@e-mc/types": "0.7.7",
|
|
26
26
|
"chalk": "4.1.2",
|
|
27
27
|
"htmlparser2": "^9.0.0",
|
|
28
28
|
"js-yaml": "^4.1.0",
|