mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
Rename proposal-json-modules to transform-json-modules (#16924)
This commit is contained in:
@@ -21,4 +21,5 @@ jobs:
|
||||
```
|
||||
npm deprecate @babel/plugin-proposal-duplicate-named-capturing-groups-regex "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-duplicate-named-capturing-groups-regex instead."
|
||||
npm deprecate @babel/plugin-proposal-regexp-modifiers "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-regexp-modifiers instead."
|
||||
npm deprecate @babel/plugin-proposal-json-modules "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-modules instead."
|
||||
```
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
# @babel/plugin-proposal-json-modules
|
||||
|
||||
> Transform json modules imports (`import '...' with { type: 'json' }`) to work in browsers and Node.js.
|
||||
|
||||
See our website [@babel/plugin-proposal-json-modules](https://babeljs.io/docs/babel-plugin-proposal-json-modules) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/plugin-proposal-json-modules
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/plugin-proposal-json-modules --dev
|
||||
```
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"targets": { "firefox": "110" },
|
||||
"plugins": ["proposal-json-modules", "transform-modules-commonjs"]
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"targets": { "node": "20.6" },
|
||||
"plugins": ["proposal-json-modules", "transform-modules-commonjs"]
|
||||
}
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"targets": { "firefox": "110" },
|
||||
"plugins": [["proposal-json-modules", { "uncheckedRequire": true }]]
|
||||
}
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"targets": { "node": "16" },
|
||||
"plugins": [["proposal-json-modules", { "uncheckedRequire": true }]]
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
# @babel/plugin-transform-json-modules
|
||||
|
||||
> Transform json modules imports (`import '...' with { type: 'json' }`) to work in browsers and Node.js.
|
||||
|
||||
See our website [@babel/plugin-transform-json-modules](https://babeljs.io/docs/babel-plugin-transform-json-modules) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/plugin-transform-json-modules
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/plugin-transform-json-modules --dev
|
||||
```
|
||||
+3
-3
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "@babel/plugin-proposal-json-modules",
|
||||
"name": "@babel/plugin-transform-json-modules",
|
||||
"version": "7.25.9",
|
||||
"description": "Transform json modules imports (`import '...' with { type: 'json' }`) to work in browsers and Node.js.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-plugin-proposal-json-modules"
|
||||
"directory": "packages/babel-plugin-transform-json-modules"
|
||||
},
|
||||
"homepage": "https://babel.dev/docs/en/next/babel-plugin-proposal-json-modules",
|
||||
"homepage": "https://babel.dev/docs/en/next/babel-plugin-transform-json-modules",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
+2
-2
@@ -42,7 +42,7 @@ export default declare((api, options: Options) => {
|
||||
return (helperESM ??= importToPlatformApi(targets, transformers, false));
|
||||
}
|
||||
throw new Error(
|
||||
`@babel/plugin-proposal-json-modules can only be used when not ` +
|
||||
`@babel/plugin-transform-json-modules can only be used when not ` +
|
||||
`compiling modules, or when compiling them to CommonJS.`,
|
||||
);
|
||||
};
|
||||
@@ -58,7 +58,7 @@ export default declare((api, options: Options) => {
|
||||
}
|
||||
|
||||
return {
|
||||
name: "proposal-json-modules",
|
||||
name: "transform-json-modules",
|
||||
|
||||
inherits: syntaxImportAttributes,
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"targets": { "firefox": "110", "node": "20.6" },
|
||||
"plugins": ["proposal-json-modules"]
|
||||
"plugins": ["transform-json-modules"]
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"targets": { "firefox": "110" },
|
||||
"plugins": ["transform-json-modules", "transform-modules-commonjs"]
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"targets": { "firefox": "110" },
|
||||
"plugins": ["proposal-json-modules"]
|
||||
"plugins": ["transform-json-modules"]
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"plugins": ["proposal-json-modules", "syntax-import-defer"],
|
||||
"plugins": ["transform-json-modules", "syntax-import-defer"],
|
||||
"throws": "JSON modules do not support phase modifiers."
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"plugins": ["proposal-json-modules"],
|
||||
"plugins": ["transform-json-modules"],
|
||||
"throws": "Unknown attribute for JSON modules."
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"plugins": ["proposal-json-modules", "syntax-import-source"],
|
||||
"plugins": ["transform-json-modules", "syntax-import-source"],
|
||||
"throws": "JSON modules do not support phase modifiers."
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"sourceType": "module",
|
||||
"targets": { "firefox": "41" },
|
||||
"plugins": [
|
||||
"proposal-json-modules",
|
||||
"transform-json-modules",
|
||||
["babel-plugin-polyfill-corejs3", { "method": "usage-pure" }]
|
||||
]
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"targets": { "node": "20.6" },
|
||||
"plugins": ["transform-json-modules", "transform-modules-commonjs"]
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"targets": { "node": "20.6" },
|
||||
"plugins": ["proposal-json-modules"]
|
||||
"plugins": ["transform-json-modules"]
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"sourceType": "module",
|
||||
"targets": { "firefox": "110", "node": "16" },
|
||||
"plugins": [
|
||||
["proposal-json-modules", { "uncheckedRequire": true }],
|
||||
["transform-json-modules", { "uncheckedRequire": true }],
|
||||
"transform-modules-commonjs"
|
||||
]
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"sourceType": "module",
|
||||
"targets": { "firefox": "110", "node": "16" },
|
||||
"plugins": [["proposal-json-modules", { "uncheckedRequire": true }]]
|
||||
"plugins": [["transform-json-modules", { "uncheckedRequire": true }]]
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"sourceType": "module",
|
||||
"targets": { "firefox": "110" },
|
||||
"plugins": [
|
||||
["proposal-json-modules", { "uncheckedRequire": true }],
|
||||
["transform-json-modules", { "uncheckedRequire": true }],
|
||||
"transform-modules-commonjs"
|
||||
]
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user