@jsonic/multisource 1.0.1 → 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/package.json +6 -6
- package/src/multisource.ts +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsonic/multisource",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/multisource.js",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -42,15 +42,15 @@
|
|
|
42
42
|
"dist"
|
|
43
43
|
],
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@types/jest": "^29.5.
|
|
45
|
+
"@types/jest": "^29.5.3",
|
|
46
46
|
"browserify": "^17.0.0",
|
|
47
47
|
"es-jest": "^2.1.0",
|
|
48
|
-
"esbuild": "^0.
|
|
48
|
+
"esbuild": "^0.19.1",
|
|
49
49
|
"esbuild-jest": "^0.5.0",
|
|
50
|
-
"jest": "^29.
|
|
51
|
-
"prettier": "^
|
|
50
|
+
"jest": "^29.6.2",
|
|
51
|
+
"prettier": "^3.0.1",
|
|
52
52
|
"tinyify": "^4.0.0",
|
|
53
|
-
"typescript": "^5.1.
|
|
53
|
+
"typescript": "^5.1.6",
|
|
54
54
|
"jsonic-multisource-pkg-test": "^0.0.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
package/src/multisource.ts
CHANGED
|
@@ -50,7 +50,7 @@ type Resolver = (
|
|
|
50
50
|
popts: MultiSourceOptions,
|
|
51
51
|
rule: Rule,
|
|
52
52
|
ctx: Context,
|
|
53
|
-
jsonic: Jsonic
|
|
53
|
+
jsonic: Jsonic,
|
|
54
54
|
) => Resolution
|
|
55
55
|
|
|
56
56
|
// Process the source into a value.
|
|
@@ -59,7 +59,7 @@ type Processor = (
|
|
|
59
59
|
popts: MultiSourceOptions,
|
|
60
60
|
rule: Rule,
|
|
61
61
|
ctx: Context,
|
|
62
|
-
jsonic: Jsonic
|
|
62
|
+
jsonic: Jsonic,
|
|
63
63
|
) => void
|
|
64
64
|
|
|
65
65
|
type Dependency = {
|
|
@@ -180,7 +180,7 @@ const MultiSource: Plugin = (jsonic: Jsonic, popts: MultiSourceOptions) => {
|
|
|
180
180
|
rule.parent.parent.node,
|
|
181
181
|
res.val,
|
|
182
182
|
rule,
|
|
183
|
-
ctx
|
|
183
|
+
ctx,
|
|
184
184
|
)
|
|
185
185
|
} else if (ctx.cfg.map.extend) {
|
|
186
186
|
rule.parent.parent.node = deep(rule.parent.parent.node, res.val)
|
|
@@ -233,7 +233,7 @@ const jsonicJsonParser = Jsonic.make('json' as any)
|
|
|
233
233
|
// TODO: use json plugin to get better error msgs.
|
|
234
234
|
const jsonProcessor = makeProcessor((src: string, res: Resolution) =>
|
|
235
235
|
// null == src ? undefined : JSON.parse(src)
|
|
236
|
-
null == src ? undefined : jsonicJsonParser(src, { fileName: res.path })
|
|
236
|
+
null == src ? undefined : jsonicJsonParser(src, { fileName: res.path }),
|
|
237
237
|
)
|
|
238
238
|
|
|
239
239
|
const jsonicProcessor = makeJsonicProcessor()
|
|
@@ -255,11 +255,11 @@ function resolvePathSpec(
|
|
|
255
255
|
popts: MultiSourceOptions,
|
|
256
256
|
ctx: Context,
|
|
257
257
|
spec: any,
|
|
258
|
-
resolvefolder: (path: string) => string
|
|
258
|
+
resolvefolder: (path: string) => string,
|
|
259
259
|
): PathSpec {
|
|
260
260
|
let msmeta = ctx.meta?.multisource
|
|
261
261
|
let base = resolvefolder(
|
|
262
|
-
null == msmeta || null == msmeta.path ? popts.path : msmeta.path
|
|
262
|
+
null == msmeta || null == msmeta.path ? popts.path : msmeta.path,
|
|
263
263
|
)
|
|
264
264
|
|
|
265
265
|
let path =
|