Files
discourse/package.json
T
David Taylor 439efc7419 DEV: Introduce system for renaming CSS variables (#42733)
From time-to-time, variables may need to be renamed in core. To avoid
breaking existing themes and plugins, this commit introduces a system to
automatically rewrite old variable names to new ones. A list of renames
is maintained in `stylesheets/variable-renames.json`, and is applied
when CSS is compiled. This list also powers a stylelint rule which will
automatically rewrite old names to new names in source code.

Transformations apply to all core/theme/plugin code. For now, the
stylelint rule/autofix applies to core only, but this will be extracted
to `@discourse/lint-configs` in the near future.

When a transformation is applied, it adds a trailing `/* automatically
renamed --old to --new */` comment so that the behavior is
understandable from the browser developer tools.
2026-09-01 11:34:46 +01:00

56 lines
3.1 KiB
JSON

{
"private": true,
"repository": "https://github.com/discourse/discourse",
"author": "Discourse",
"license": "GPL-2.0-only",
"devDependencies": {
"@discourse/lint-configs": "^3.3.0",
"@discourse/moment-timezone-names-translations": "^1.0.0",
"@fortawesome/fontawesome-free": "7.2.0",
"@glint/ember-tsc": "^1.8.11",
"@glint/tsserver-plugin": "^2.5.17",
"@rdil/parallel-prettier": "^3.0.0",
"concurrently": "^9.2.1",
"eslint": "10.6.0",
"execa": "^9.6.0",
"jsdoc": "^4.0.5",
"lefthook": "^2.1.9",
"licensee": "^11.1.1",
"lint-to-the-future": "^3.2.0",
"lint-to-the-future-eslint": "^4.0.0",
"playwright": "1.59.1",
"postcss-selector-parser": "^7.1.4",
"prettier": "3.8.1",
"postcss-value-parser": "^4.2.0",
"stylelint": "17.5.0",
"typescript": "^5.9.3"
},
"scripts": {
"dev": "bin/dev",
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\"",
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\"",
"lint:css": "pnpm stylelint 'app/assets/stylesheets/**/*.scss' $(script/list_bundled_plugins '/assets/stylesheets/**/*.scss') 'themes/**/*.scss'",
"lint:css:fix": "pnpm stylelint --fix 'app/assets/stylesheets/**/*.scss' $(script/list_bundled_plugins '/assets/stylesheets/**/*.scss') 'themes/**/*.scss'",
"lint:js": "eslint ./frontend $(script/list_bundled_plugins) ./themes --cache --no-error-on-unmatched-pattern --max-warnings 0",
"lint:js:fix": "eslint --fix ./frontend $(script/list_bundled_plugins) ./themes --no-error-on-unmatched-pattern",
"lint:prettier": "pnpm pprettier --list-different 'app/assets/stylesheets/**/*.scss' 'frontend/**/*.{js,gjs,ts,gts,mts,cts,cjs,mjs,css}' $(script/list_bundled_plugins '/assets/stylesheets/**/*.scss') $(script/list_bundled_plugins '/{assets,admin/assets,test}/javascripts/**/*.{js,gjs,ts,gts,mts,cts,cjs,mjs}') 'themes/**/*.{js,gjs,ts,gts,cjs,mjs,scss}'",
"lint:prettier:fix": "pnpm prettier -w --no-error-on-unmatched-pattern 'app/assets/stylesheets/**/*.scss' 'frontend/**/*.{js,gjs,ts,gts,mts,cts,cjs,mjs,css}' $(script/list_bundled_plugins '/assets/stylesheets/**/*.scss') $(script/list_bundled_plugins '/{assets,admin/assets,test}/javascripts/**/*.{js,gjs,ts,gts,mts,cts,cjs,mjs}') 'themes/**/*.{js,gjs,ts,gts,cjs,mjs,scss}'",
"lint:types": "ember-tsc -b",
"types:generate": "pnpm --dir=frontend/discourse-i18n ember-tsc && pnpm --dir=frontend/discourse-types generate-external",
"types:watch": "pnpm types:generate && pnpm ember-tsc -b --watch --preserveWatchOutput",
"lttf:ignore": "lint-to-the-future ignore",
"lttf:output": "lint-to-the-future output -o ./lint-progress/",
"lint-progress": "pnpm lttf:output && npx html-pages ./lint-progress --no-cache",
"playwright-install": "playwright install --no-shell chromium",
"build": "pnpm --silent --dir=frontend/discourse build",
"start": "pnpm --silent --dir=frontend/discourse start"
},
"engines": {
"node": ">= 20",
"npm": "please-use-pnpm",
"yarn": "please-use-pnpm",
"pnpm": "^10"
},
"packageManager": "pnpm@10.34.5"
}