Skip to content

Commit 98c1c4e

Browse files
chore(deps): update dependency typescript to v7 (#399)
* chore(deps): update npm packages * fix(ci): keep TypeScript 6 for Angular peer, migrate postcss-nested 8 to ESM TypeScript 7 is a native rewrite whose main export is version-only, so import * as ts from "typescript" no longer provides the compiler API. Angular compiler-cli still peers on typescript >=6.0 <6.1. Keep postcss-nested 8 by switching the bitwarden PostCSS config to ESM. Also block TypeScript major upgrades in Renovate until Angular catches up. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: LongYinan <lynweklm@gmail.com>
1 parent 12b63ac commit 98c1c4e

6 files changed

Lines changed: 37 additions & 18 deletions

File tree

.github/renovate.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,12 @@
88
"**/__tests__/**",
99
"**/test/**",
1010
"**/__fixtures__/**"
11+
],
12+
"packageRules": [
13+
{
14+
"description": "Angular compiler-cli peers typescript >=6.0 <6.1; TS 7 is a native rewrite with a different public API",
15+
"matchPackageNames": ["typescript"],
16+
"allowedVersions": "<7"
17+
}
1118
]
1219
}

napi/angular-compiler/benchmarks/bitwarden/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"path-browserify": "^1.0.1",
3939
"postcss": "^8.5.6",
4040
"postcss-import": "^16.1.1",
41-
"postcss-nested": "^7.0.2",
41+
"postcss-nested": "^8.0.0",
4242
"sass": "^1.97.2",
4343
"tailwindcss": "^4.0.0",
4444
"typescript": "catalog:",

napi/angular-compiler/benchmarks/bitwarden/postcss.config.cjs renamed to napi/angular-compiler/benchmarks/bitwarden/postcss.config.mjs

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,41 @@
11
/**
22
* PostCSS configuration for Bitwarden benchmark
33
* Mirrors the configuration from bitwarden-clients/apps/web/postcss.config.js
4+
*
5+
* ESM: postcss-nested v8 is ESM-only.
46
*/
57

6-
const path = require('path')
8+
import path from 'node:path'
9+
import { fileURLToPath } from 'node:url'
10+
11+
import autoprefixer from 'autoprefixer'
12+
import postcssImport from 'postcss-import'
13+
import postcssNested from 'postcss-nested'
14+
import tailwindcss from 'tailwindcss'
15+
16+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
717

818
// Paths relative to bitwarden-clients
919
const BITWARDEN_ROOT = path.resolve(__dirname, '../../../../../bitwarden-clients')
1020
const BITWARDEN_WEB = path.resolve(BITWARDEN_ROOT, 'apps/web')
1121
const BITWARDEN_LIBS = path.resolve(BITWARDEN_ROOT, 'libs')
1222

13-
module.exports = {
23+
export default {
1424
plugins: [
1525
// postcss-import for @import resolution
16-
require('postcss-import')({
26+
postcssImport({
1727
path: [path.resolve(BITWARDEN_LIBS), path.resolve(BITWARDEN_WEB, 'src/scss')],
1828
}),
1929

2030
// postcss-nested for SCSS-like nesting
21-
require('postcss-nested'),
31+
postcssNested,
2232

2333
// Tailwind CSS
24-
require('tailwindcss')({
34+
tailwindcss({
2535
config: path.resolve(__dirname, 'tailwind.config.cjs'),
2636
}),
2737

2838
// Autoprefixer for browser compatibility
29-
require('autoprefixer'),
39+
autoprefixer,
3040
],
3141
}

napi/angular-compiler/benchmarks/bitwarden/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export default defineConfig(({ mode }) => {
8888
silenceDeprecations: ['legacy-js-api', 'import'],
8989
},
9090
},
91-
postcss: resolve(__dirname, 'postcss.config.cjs'),
91+
postcss: resolve(__dirname, 'postcss.config.mjs'),
9292
},
9393

9494
// Define process.env variables that bitwarden uses

pnpm-lock.yaml

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ catalog:
4545
'@tailwindcss/vite': 4.3.3
4646
'@types/node': 24.1.0
4747
tsdown: 0.22.14
48+
# Stay on TypeScript 6 until Angular supports the native TS 7 API rewrite.
49+
# Angular compiler-cli peers: typescript >=6.0 <6.1
4850
typescript: 6.0.3
4951
vitest: 4.1.10
5052
oxfmt: 0.63.0

0 commit comments

Comments
 (0)