load-populate-files 1.0.2 → 1.0.3
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/dist/lib/loader.js +2 -1
- package/package.json +7 -6
package/dist/lib/loader.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { defaultImport } from 'default-import';
|
|
2
|
+
import { hasCode } from 'unknown-error';
|
|
2
3
|
import { isPopulateFileParams } from './lib/populate-files-validator.js';
|
|
3
4
|
export const loadFile = async (filePath)=>{
|
|
4
5
|
let mod;
|
|
5
6
|
try {
|
|
6
7
|
mod = await import(filePath);
|
|
7
8
|
} catch (err) {
|
|
8
|
-
if (
|
|
9
|
+
if (hasCode(err, 'ERR_MODULE_NOT_FOUND')) {
|
|
9
10
|
throw new Error(`JS file not found: ${filePath}`, {
|
|
10
11
|
cause: err
|
|
11
12
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "load-populate-files",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Load and dynamically populate file content",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=24"
|
|
@@ -40,12 +40,13 @@
|
|
|
40
40
|
"ci-info": "^4.4.0",
|
|
41
41
|
"default-import": "^3.0.1",
|
|
42
42
|
"entry-script": "^4.1.0",
|
|
43
|
-
"haywire": "^
|
|
44
|
-
"haywire-launcher": "^1.0.
|
|
45
|
-
"juniper": "^2.2.
|
|
46
|
-
"juniper-validator": "^0.
|
|
43
|
+
"haywire": "^2.0.0",
|
|
44
|
+
"haywire-launcher": "^1.0.2",
|
|
45
|
+
"juniper": "^2.2.1",
|
|
46
|
+
"juniper-validator": "^0.3.0",
|
|
47
47
|
"parse-cwd": "^2.0.2",
|
|
48
|
-
"populate-files": "^1.0.
|
|
48
|
+
"populate-files": "^1.0.2",
|
|
49
|
+
"unknown-error": "^0.1.0",
|
|
49
50
|
"yargs": "^18.2.0"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|