Skip to content

Commit

Permalink
chore: enable decorators in swc/jest
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr committed Jun 25, 2024
1 parent 2eec95e commit af3f2c4
Show file tree
Hide file tree
Showing 33 changed files with 301 additions and 33 deletions.
10 changes: 9 additions & 1 deletion yarn-project/accounts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@
"rootDir": "./src",
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/archiver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,15 @@
"workerThreads": true,
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/aztec-faucet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@
"rootDir": "./src",
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/aztec-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@
"rootDir": "./src",
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/aztec.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,15 @@
"rootDir": "./src",
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/aztec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,15 @@
"rootDir": "./src",
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/bb-prover/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@
"rootDir": "./src",
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,15 @@
"rootDir": "./src",
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/circuit-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,15 @@
"rootDir": "./src",
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/circuits.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,15 @@
],
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"moduleNameMapper": {
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@
],
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"reporters": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/end-to-end/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,15 @@
],
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"reporters": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/entrypoints/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@
"rootDir": "./src",
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/ethereum/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,15 @@
"rootDir": "./src",
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/foundation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,15 @@
"jest": {
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"moduleNameMapper": {
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/key-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@
"rootDir": "./src",
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/kv-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@
"workerThreads": true,
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/merkle-tree/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@
"testTimeout": 15000,
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/noir-contracts.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@
"rootDir": "./src",
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/noir-protocol-circuits-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@
],
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"reporters": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/p2p-bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@
"rootDir": "./src",
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
10 changes: 9 additions & 1 deletion yarn-project/p2p/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@
"rootDir": "./src",
"transform": {
"^.+\\.tsx?$": [
"@swc/jest"
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"extensionsToTreatAsEsm": [
Expand Down
14 changes: 13 additions & 1 deletion yarn-project/package.common.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,19 @@
},
"jest": {
"extensionsToTreatAsEsm": [".ts"],
"transform": { "^.+\\.tsx?$": ["@swc/jest"] },
"transform": {
"^.+\\.tsx?$": [
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
}
}
}
]
},
"moduleNameMapper": {
"^(\\.{1,2}/.*)\\.[cm]?js$": "$1"
},
Expand Down
Loading

0 comments on commit af3f2c4

Please sign in to comment.