Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: ensure published files can be executed on Deno; closes #734
- Loading branch information
1 parent
1b7d7d2
commit a02691a
Showing
7 changed files
with
36 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import $RefParser from 'json-schema-ref-parser'; | ||
import { JSONPath } from 'jsonpath-plus'; | ||
|
||
import { setDependencies } from './dist/shared.js'; | ||
|
||
setDependencies({ JSONPath, $RefParser }); | ||
|
||
export { default, JSONSchemaFaker } from './dist/shared.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const jsf = require('./lib/main.mjs').default; | ||
const jsf = require('./shared').default; | ||
|
||
module.exports = jsf; | ||
module.exports.JSONSchemaFaker = { ...jsf }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
if (typeof process !== 'undefined') { | ||
global.location = { href: `${process.cwd()}/` }; | ||
} | ||
|
||
import './vendor.js'; | ||
|
||
import { setDependencies } from './shared.js'; | ||
|
||
/* global $RefParser, JSONPath */ | ||
if (typeof $RefParser !== 'undefined' && typeof JSONPath !== 'undefined') { | ||
setDependencies({ ...JSONPath, $RefParser }); | ||
} | ||
|
||
export { default, JSONSchemaFaker } from './shared.js'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { setDependencies } from './lib/vendor.mjs'; | ||
export { default, JSONSchemaFaker } from './lib/index.mjs'; |