Skip to content

Commit

Permalink
v1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rjrodger committed Nov 4, 2024
1 parent 37504b8 commit a534c4e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
5 changes: 3 additions & 2 deletions dist/resolver/pkg.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/resolver/pkg.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsonic/multisource",
"version": "1.3.0",
"version": "1.4.0",
"description": "",
"main": "dist/multisource.js",
"type": "commonjs",
Expand Down Expand Up @@ -52,7 +52,7 @@
"@jsonic/doc": "^0.0.8",
"@jsonic/jsonic-next": ">=2.12.1",
"@jsonic/path": "^0.7.0",
"@types/node": "^22.7.8",
"@types/node": "^22.8.7",
"jsonic-multisource-pkg-test": "^0.0.1",
"typescript": "^5.6.3"
},
Expand Down
5 changes: 3 additions & 2 deletions src/resolver/pkg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ function makePkgResolver(options: any): Resolver {

let potentials = []

if (ps.path && 'string' === typeof ps.path) {
if (null != ps.path && 'string' === typeof ps.path) {
const pspath = ps.path

// Add the main paths of the current require
potentials.push(...useRequire.main.paths.map((p: string) => p + ps.path))
potentials.push(...useRequire.main.paths.map((p: string) => Path.join(p, pspath)))

// Remove module name prefix
const subpath = ps.path.replace(/^(@[^/]+\/)?[^/]+\//, '')
Expand Down

0 comments on commit a534c4e

Please sign in to comment.