Sha256: 837fc67a8dfc3e1c077f1d71323479b461c73e6c188b1a8b87437c60cf07a1c1

Contents?: true

Size: 1.3 KB

Versions: 19

Compression:

Stored size: 1.3 KB

Contents

"use strict";

const babelP = import("./lib/index.js");
let babel = null;
Object.defineProperty(exports, "__ initialize @babel/core cjs proxy __", {
  set(val) {
    babel = val;
  },
});

exports.version = require("./package.json").version;

const functionNames = [
  "createConfigItem",
  "loadPartialConfig",
  "loadOptions",
  "transform",
  "transformFile",
  "transformFromAst",
  "parse",
];
const propertyNames = [
  "buildExternalHelpers",
  "types",
  "tokTypes",
  "traverse",
  "template",
];

for (const name of functionNames) {
  exports[name] = function (...args) {
    babelP.then(babel => {
      babel[name](...args);
    });
  };
  exports[`${name}Async`] = function (...args) {
    return babelP.then(babel => babel[`${name}Async`](...args));
  };
  exports[`${name}Sync`] = function (...args) {
    if (!babel) throw notLoadedError(`${name}Sync`, "callable");
    return babel[`${name}Sync`](...args);
  };
}

for (const name of propertyNames) {
  Object.defineProperty(exports, name, {
    get() {
      if (!babel) throw notLoadedError(name, "accessible");
      return babel[name];
    },
  });
}

function notLoadedError(name, keyword) {
  return new Error(
    `The \`${name}\` export of @babel/core is only ${keyword}` +
      ` from the CommonJS version after that the ESM version is loaded.`
  );
}

Version data entries

19 entries across 15 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/jscodeshift/node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.51 node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.50 node_modules/jscodeshift/node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.50 node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.49 node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.49 node_modules/jscodeshift/node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.48 node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.48 node_modules/jscodeshift/node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.47 node_modules/jscodeshift/node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.46 node_modules/jscodeshift/node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.45 node_modules/jscodeshift/node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.44 node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.43 node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.42 node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.41 node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.40 node_modules/@babel/core/cjs-proxy.cjs
wice_grid-7.1.0 node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.39 node_modules/@babel/core/cjs-proxy.cjs
immosquare-cleaner-0.1.38 node_modules/@babel/core/cjs-proxy.cjs