Repository: swc-project/swc (rust)

Issue:
[WRONG] `jsc.experimental.keepImportAssertions` is `experimental`, explicitly
### Describe the bug

The bug is described here: https://github.com/TypeStrong/ts-node/issues/2056


With version 1.3.83, swc renames the experimental configuration option jsc.experimental.keepImportAssertions to jsc.experimental.keepImportAttributes as per https://github.com/swc-project/swc/pull/7914 

### Suggestion to keep other libraries working without so much failure:
- Adding jsc.experimental wrong or non-supported keys shouldn't throw an error ( maybe warning )
- Alias renamed keys to the new keys to it still backward compatible



The error during running ts-node: 
```
Failed to deserialize buffer as swc::config::Options
JSON: {"sourceMaps":true,"module":{"noInterop":false,"type":"commonjs","strictMode":true,"ignoreDynamic":false},"swcrc":false,"jsc":{"parser":{"syntax":"typescript","tsx":false,"dynamicImport":true,"importAssertions":true},"target":"es2015","transform":{"legacyDecorator":true,"react":{"throwIfNamespace":false,"useBuiltins":false}},"keepClassNames":false,"experimental":{"keepImportAssertions":true}}}

Caused by:
    unknown field `keepImportAssertions`, expected one of `plugins`, `keepImportAttributes`, `emitAssertForImportAttributes`, `cacheRoot`, `disableBuiltinTransformsForInternalTesting` at line 1 column 396
```

### Input code

_No response_

### Config

_No response_

### Playground link

_No response_

### SWC Info output

_No response_

### Expected behavior

The build should be working normally

### Actual behavior

_No response_

### Version

1.3.83

### Additional context

_No response_

Pull request description:
feat(es/config): Accept `jsc.experimental.keepImportAssertions`
**Description:**


**Related issue:**

 - Closes #7923.

Patch:
diff --git a/crates/swc/src/config/mod.rs b/crates/swc/src/config/mod.rs
index 1a79edfdf0..0dbb836cd7 100644
--- a/crates/swc/src/config/mod.rs
+++ b/crates/swc/src/config/mod.rs
@@ -1497,7 +1497,7 @@ pub struct JscExperimental {
     #[serde(default)]
     pub plugins: Option<Vec<PluginConfig>>,
     /// If true, keeps import assertions in the output.
-    #[serde(default)]
+    #[serde(default, alias = "keepImportAssertions")]
     pub keep_import_attributes: BoolConfig<false>,
 
     #[serde(default)]


Test patch:
diff --git a/crates/swc/tests/fixture/issues-7xxx/7908/input/3/.swcrc b/crates/swc/tests/fixture/issues-7xxx/7908/input/3/.swcrc
new file mode 100644
index 0000000000..2e8d9afe75
--- /dev/null
+++ b/crates/swc/tests/fixture/issues-7xxx/7908/input/3/.swcrc
@@ -0,0 +1,17 @@
+{
+    "$schema": "https://json.schemastore.org/swcrc",
+    "jsc": {
+        "parser": {
+            "syntax": "typescript"
+        },
+        "target": "es2022",
+        "experimental": {
+            "keepImportAssertions": true,
+            "emitAssertForImportAttributes": true
+        }
+    },
+    "module": {
+        "type": "es6"
+    },
+    "isModule": true
+}
\ No newline at end of file
diff --git a/crates/swc/tests/fixture/issues-7xxx/7908/input/3/1.js b/crates/swc/tests/fixture/issues-7xxx/7908/input/3/1.js
new file mode 100644
index 0000000000..e020128a2d
--- /dev/null
+++ b/crates/swc/tests/fixture/issues-7xxx/7908/input/3/1.js
@@ -0,0 +1,3 @@
+import packageJSON from "./package.json" assert { type: "json" };
+
+console.log(packageJSON)
diff --git a/crates/swc/tests/fixture/issues-7xxx/7908/output/3/1.js b/crates/swc/tests/fixture/issues-7xxx/7908/output/3/1.js
new file mode 100644
index 0000000000..39c441f4ee
--- /dev/null
+++ b/crates/swc/tests/fixture/issues-7xxx/7908/output/3/1.js
@@ -0,0 +1,4 @@
+import packageJSON from "./package.json" assert {
+    type: "json"
+};
+console.log(packageJSON);