%PDF- %PDF-
| Direktori : /proc/self/root/proc/2/task/2/cwd/usr/local/lib/node_modules/babel-upgrade/lib/ |
| Current File : //proc/self/root/proc/2/task/2/cwd/usr/local/lib/node_modules/babel-upgrade/lib/upgradeOptions.js |
"use strict";
var define = function define(defaults) {
return function (opts) {
return Object.assign(opts, defaults);
};
};
var updaters = {
__proto__: null,
"@babel/plugin-proposal-decorators": define({
legacy: true
}),
"@babel/plugin-syntax-decorators": define({
legacy: true
}),
"@babel/plugin-proposal-pipeline-operator": define({
proposal: "minimal"
}),
"@babel/plugin-syntax-pipeline-operator": define({
proposal: "minimal"
})
};
module.exports = function updateOptions(entry) {
var result = Array.isArray(entry) ? entry : [entry];
var updater = updaters[result[0]];
if (!updater) return entry;
result[1] = updater(result[1] || {});
return result;
};