move wrapper to js extension for backwards compatibility

This commit is contained in:
d98762625 2020-05-22 13:09:16 +01:00
parent 16db8b0b72
commit e9fcae8c49
2 changed files with 3 additions and 2 deletions

View file

@ -27,10 +27,10 @@
"type": "git", "type": "git",
"url": "https://github.com/gchq/CyberChef/" "url": "https://github.com/gchq/CyberChef/"
}, },
"main": "./src/node/wrapper.cjs", "main": "./src/node/wrapper.js",
"exports": { "exports": {
"import": "./src/node/index.mjs", "import": "./src/node/index.mjs",
"require": "./src/node/wrapper.cjs" "require": "./src/node/wrapper.js"
}, },
"bugs": "https://github.com/gchq/CyberChef/issues", "bugs": "https://github.com/gchq/CyberChef/issues",
"browserslist": [ "browserslist": [

View file

@ -7,6 +7,7 @@
* @license Apache-2.0 * @license Apache-2.0
*/ */
console.log('CJS')
/* eslint no-global-assign: ["off"] */ /* eslint no-global-assign: ["off"] */
require = require("esm")(module); require = require("esm")(module);
module.exports = require("./index.mjs"); module.exports = require("./index.mjs");