BLUE
PHP 7.4.33
Path:
/var/www/podio-api-client/node_modules/tslib/test/validateModuleExportsMatchCommonJS
Run
Logout
Edit File
Size: 824 B
Close
/var/www/podio-api-client/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js
Text
Base64
// When on node 14, it validates that all of the commonjs exports // are correctly re-exported for es modules importers. const nodeMajor = Number(process.version.split(".")[0].slice(1)) if (nodeMajor < 14) { console.log("Skipping because node does not support module exports.") process.exit(0) } // ES Modules import via the ./modules folder import * as esTSLib from "../../modules/index.js" // Force a commonjs resolve import { createRequire } from "module"; const commonJSTSLib = createRequire(import.meta.url)("../../tslib.js"); for (const key in commonJSTSLib) { if (commonJSTSLib.hasOwnProperty(key)) { if(!esTSLib[key]) throw new Error(`ESModules is missing ${key} - it needs to be re-exported in ./modules/index.js`) } } console.log("All exports in commonjs are available for es module consumers.")
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 2
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
index.js
824 B
lrw-r--r--
2023-12-27 12:33:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package.json
71 B
lrw-r--r--
2023-12-27 12:33:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).