Skip to content

Commit

Permalink
Expose package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Nov 3, 2020
1 parent b4c981e commit d66b663
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Expand Up @@ -9,7 +9,7 @@ const t = require("@babel/types");

const transformRuntime = require("../");

const runtimeVersion = require("../../babel-runtime/package.json").version;
const runtimeVersion = require("@babel/runtime/package.json").version;
const corejs3Definitions = require("../lib/runtime-corejs3-definitions").default();

function outputFile(filePath, data) {
Expand Down Expand Up @@ -137,6 +137,7 @@ function writeHelperExports(runtimeName, helperSubExports) {
const exports = {
...helperSubExports,
"./regenerator": "./regenerator/index.js",
"./package.json": "./package.json",
};
const pkgDirname = getRuntimeRoot(runtimeName);
const pkgJsonPath = require.resolve(`${pkgDirname}/package.json`);
Expand Down
1 change: 1 addition & 0 deletions packages/babel-runtime-corejs3/package.json
Expand Up @@ -418,6 +418,7 @@
"default": "./helpers/wrapRegExp/index.mjs"
},
"./regenerator": "./regenerator/index.js",
"./package.json": "./package.json",
"./core-js-stable/": "./core-js-stable/",
"./core-js-stable/map": "./core-js-stable/map.js",
"./core-js-stable/promise": "./core-js-stable/promise.js",
Expand Down
3 changes: 2 additions & 1 deletion packages/babel-runtime/package.json
Expand Up @@ -417,6 +417,7 @@
"module": "./helpers/wrapRegExp/index.mjs",
"default": "./helpers/wrapRegExp/index.mjs"
},
"./regenerator": "./regenerator/index.js"
"./regenerator": "./regenerator/index.js",
"./package.json": "./package.json"
}
}

0 comments on commit d66b663

Please sign in to comment.