From 25de8324211e666758976288a33d5442aa97fb48 Mon Sep 17 00:00:00 2001 From: Natron Kan Date: Thu, 5 Jan 2023 21:58:41 +0800 Subject: [PATCH] chore: use @babel/plugin-proposal-decorators --- babel.config.js | 3 ++- package.json | 2 ++ pnpm-lock.yaml | 30 ++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/babel.config.js b/babel.config.js index 50aa244..ff0db1a 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,4 @@ module.exports = { - presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'] + presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'], + plugins: [['@babel/plugin-proposal-decorators', { legacy: true }]] } diff --git a/package.json b/package.json index 47f6ac6..0ed907d 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,8 @@ "license": "GPL-3.0", "devDependencies": { "@babel/core": "^7.17.10", + "@babel/plugin-proposal-decorators": "^7.20.7", + "@babel/plugin-syntax-decorators": "^7.19.0", "@babel/preset-env": "^7.17.10", "@babel/preset-typescript": "^7.16.7", "@jest/types": "^29.3.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e342a14..16ae12f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2,6 +2,8 @@ lockfileVersion: 5.4 specifiers: '@babel/core': ^7.17.10 + '@babel/plugin-proposal-decorators': ^7.20.7 + '@babel/plugin-syntax-decorators': ^7.19.0 '@babel/preset-env': ^7.17.10 '@babel/preset-typescript': ^7.16.7 '@jest/types': ^29.3.1 @@ -31,6 +33,8 @@ specifiers: devDependencies: '@babel/core': 7.20.7 + '@babel/plugin-proposal-decorators': 7.20.7_@babel+core@7.20.7 + '@babel/plugin-syntax-decorators': 7.19.0_@babel+core@7.20.7 '@babel/preset-env': 7.20.2_@babel+core@7.20.7 '@babel/preset-typescript': 7.18.6_@babel+core@7.20.7 '@jest/types': 29.3.1 @@ -424,6 +428,22 @@ packages: - supports-color dev: true + /@babel/plugin-proposal-decorators/7.20.7_@babel+core@7.20.7: + resolution: {integrity: sha512-JB45hbUweYpwAGjkiM7uCyXMENH2lG+9r3G2E+ttc2PRXAoEkpfd/KW5jDg4j8RS6tLtTG1jZi9LbHZVSfs1/A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.7 + '@babel/helper-create-class-features-plugin': 7.20.7_@babel+core@7.20.7 + '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-replace-supers': 7.20.7 + '@babel/helper-split-export-declaration': 7.18.6 + '@babel/plugin-syntax-decorators': 7.19.0_@babel+core@7.20.7 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/plugin-proposal-dynamic-import/7.18.6_@babel+core@7.20.7: resolution: {integrity: sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==} engines: {node: '>=6.9.0'} @@ -603,6 +623,16 @@ packages: '@babel/helper-plugin-utils': 7.20.2 dev: true + /@babel/plugin-syntax-decorators/7.19.0_@babel+core@7.20.7: + resolution: {integrity: sha512-xaBZUEDntt4faL1yN8oIFlhfXeQAWJW7CLKYsHTUqriCUbj8xOra8bfxxKGi/UwExPFBuPdH4XfHc9rGQhrVkQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.7 + '@babel/helper-plugin-utils': 7.20.2 + dev: true + /@babel/plugin-syntax-dynamic-import/7.8.3_@babel+core@7.20.7: resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} peerDependencies: