Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
working-directory: apps/web
env:
CI_PACKAGE: true
run: VERSION=$(scripts/get-version-from-git.sh) pnpm build
run: VERSION=$(scripts/get-version-from-git.sh) pnpm run build

- name: Upload Artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/end-to-end-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
env:
CI_PACKAGE: true
working-directory: apps/web
run: VERSION=$(scripts/get-version-from-git.sh) pnpm build
run: VERSION=$(scripts/get-version-from-git.sh) pnpm run build

- name: Upload Artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
Expand Down
4 changes: 2 additions & 2 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"opus-recorder": "^8.0.3",
"pako": "^2.0.3",
"png-chunks-extract": "^1.0.0",
"posthog-js": "1.356.1",
"posthog-js": "1.360.2",
"qrcode": "1.5.4",
"re-resizable": "6.11.2",
"react": "catalog:",
Expand Down Expand Up @@ -163,7 +163,7 @@
"@types/react-beautiful-dnd": "^13.0.0",
"@types/react-dom": "catalog:",
"@types/react-transition-group": "^4.4.0",
"@types/sanitize-html": "2.16.0",
"@types/sanitize-html": "2.16.1",
"@types/sdp-transform": "^2.4.10",
"@types/semver": "^7.5.8",
"@types/tar-js": "^0.3.5",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/@types/commonmark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ declare module "commonmark" {
export type Attr = [key: string, value: string];

/* eslint-disable @typescript-eslint/naming-convention */
export interface HtmlRenderer {
interface HtmlRenderer {
// As far as @types/commonmark is concerned, these are not public, so add them
// https://github.com/commonmark/commonmark.js/blob/master/lib/render/html.js#L272-L296
text: (this: commonmark.HtmlRenderer, node: commonmark.Node) => void;
Expand Down
1 change: 1 addition & 0 deletions knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default {
// Used in playwright-screenshots.sh
"wait-on",
],
ignoreBinaries: ["awk"],
},
"apps/web": {
entry: [
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"pretty-format@30>react-is": "19.2.4",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"oidc-client-ts": "3.4.1",
"oidc-client-ts": "3.5.0",
"jwt-decode": "4.0.0",
"caniuse-lite": "1.0.30001780",
"markdown-it": "14.1.1",
Expand All @@ -34,7 +34,7 @@
"wrap-ansi": "npm:wrap-ansi@^10.0.0",
"matrix-widget-api": "^1.17.0",
"qs": "6.15.0",
"serialize-javascript": "7.0.3"
"serialize-javascript": "7.0.4"
},
"devDependencies": {
"@action-validator/cli": "^0.6.0",
Expand All @@ -45,11 +45,11 @@
"cronstrue": "^3.0.0",
"eslint-plugin-matrix-org": "^3.0.0",
"husky": "^9.0.0",
"knip": "^5.36.2",
"knip": "5.87.0",
"lint-staged": "^16.0.0",
"lodash": "^4.17.21",
"minimist": "^1.2.6",
"nx": "22.5.3",
"nx": "22.5.4",
"prettier": "3.8.1",
"typescript": "catalog:",
"yaml": "^2.3.3"
Expand Down
82 changes: 10 additions & 72 deletions patches/knip.patch
Original file line number Diff line number Diff line change
@@ -1,91 +1,29 @@
diff --git a/dist/binaries/bash-parser.js b/dist/binaries/bash-parser.js
index 7e8c465e4fcf156988edd35ac725f8159edc5a87..ab28395084c77ed8922a3fa882daaff89f1e65fd 100644
--- a/dist/binaries/bash-parser.js
+++ b/dist/binaries/bash-parser.js
@@ -49,6 +49,16 @@ export const getDependenciesFromScript = (script, options) => {
if (definedFunctions.has(binary))
return [];
const args = node.suffix?.map(arg => arg.text) ?? [];
+ if (binary === "find" && args.includes("-exec")) {
+ const i = args.indexOf("-exec");
+ const [execCmd, ...execArgs] = node.suffix.slice(i + 1, -1);
+ return getDependenciesFromNodes([{
+ type: "Command",
+ name: execCmd,
+ suffix: execArgs,
+ }]);
+ return (commandExpansions.flatMap(expansion => getDependenciesFromNodes(expansion.commandAST.commands)) ?? []);
+ }
if (['!', 'test'].includes(binary))
return fromArgs(args);
const fromNodeOptions = node.prefix
diff --git a/dist/plugins/babel/index.js b/dist/plugins/babel/index.js
index 4772fcda2ab92dfc80b248e91dc5c3894920d075..3b34f9c3439b6576f07959abf42f37c0418c2fc5 100644
index d451e0ab75c530b794e6925466e18e798b7df960..ca4eeb240ef200fe89964532764513279c45b45c 100644
--- a/dist/plugins/babel/index.js
+++ b/dist/plugins/babel/index.js
@@ -9,15 +9,23 @@ const config = ['babel.config.{json,js,cjs,mjs,cts,ts}', '.babelrc.{json,js,cjs,
@@ -9,11 +9,13 @@ const config = ['babel.config.{json,js,cjs,mjs,cts,ts}', '.babelrc.{json,js,cjs,
const getName = (value) => [Array.isArray(value) ? value[0] : value].filter(name => typeof name === 'string');
export const getDependenciesFromConfig = (config) => {
const presets = config.presets?.flatMap(getName).map(name => resolveName(name, 'preset')) ?? [];
+ const presetIncludes = config.presets?.filter(preset => Array.isArray(preset) && typeof preset[1] === "object").flatMap(preset => preset[1]?.include ?? []).map(name => resolveName(name, 'plugin')) ?? [];
const plugins = config.plugins?.flatMap(getName).map(name => resolveName(name, 'plugin')) ?? [];
const nested = config.env ? Object.values(config.env).flatMap(getDependenciesFromConfig) : [];
const overrides = config.overrides ? [config.overrides].flat().flatMap(getDependenciesFromConfig) : [];
- return compact([
+ const deps = [
return compact([
...presets.map(id => toDeferResolve(id)),
+ ...presetIncludes.map(id => toDeferResolve(id)),
...plugins.map(id => toDeferResolve(id)),
...nested,
...overrides,
- ]);
+ ];
+
+ if (deps.find(dep => dep.specifier === "@babel/plugin-transform-runtime")) {
+ deps.push(toDeferResolve("@babel/runtime"));
+ }
+
+ return compact(deps);
};
const resolveConfig = async (config) => {
if (typeof config === 'function')
diff --git a/dist/plugins/nx/index.js b/dist/plugins/nx/index.js
index 43bd253a3bcae4e9f8cb05be0db09b0b14598000..415479489f30cfcc9d57557a7fab02babdf12030 100644
--- a/dist/plugins/nx/index.js
+++ b/dist/plugins/nx/index.js
@@ -34,18 +34,18 @@ const resolveConfig = async (localConfig, options) => {
.map(target => target?.executor)
.filter(executor => executor && !executor.startsWith('.'))
.map(executor => executor?.split(':')[0]);
- const scripts = targets
+ const inputs = targets
.filter(target => target.executor === 'nx:run-commands' || target.command)
.flatMap(target => {
+ let commands = [];
if (target.command)
- return [target.command];
+ commands = [target.command];
if (target.options?.command)
- return [target.options.command];
+ commands = [target.options.command];
if (target.options?.commands)
- return target.options.commands.map(commandConfig => typeof commandConfig === 'string' ? commandConfig : commandConfig.command);
- return [];
+ commands = target.options.commands.map(commandConfig => typeof commandConfig === 'string' ? commandConfig : commandConfig.command);
+ return options.getInputsFromScripts(commands, { cwd: target.options?.cwd });
});
- const inputs = options.getInputsFromScripts(scripts);
const configInputs = targets.flatMap(target => {
const opts = target.options;
if (!opts)
...(plugins.includes('@babel/plugin-transform-runtime')
? [toDeferResolve('@babel/runtime', { optional: true })]
diff --git a/dist/typescript/pragmas/custom.js b/dist/typescript/pragmas/custom.js
index f913d03560252b9161c11f0371f1a68198ed78bd..7ac5cc43b1fff9eec9b7b59d48c5871fb8403eb4 100644
index 6ab98ae60cf8f07047a0ad7132c11a0da780bfbc..7c8818e81cde7e4ee9c11084d55043441e37208e 100644
--- a/dist/typescript/pragmas/custom.js
+++ b/dist/typescript/pragmas/custom.js
@@ -2,7 +2,7 @@ import { IMPORT_FLAGS } from '../../constants.js';
import { getEnvSpecifier } from '../../plugins/vitest/helpers.js';
import { isAbsolute, isInternal } from '../../util/path.js';
import { getLeadingComments, stripQuotes } from '../ast-helpers.js';
@@ -2,7 +2,7 @@ import { IMPORT_FLAGS } from "../../constants.js";
import { getEnvSpecifier } from "../../plugins/vitest/helpers.js";
import { isAbsolute, isInternal } from "../../util/path.js";
import { getLeadingComments, stripQuotes } from "../ast-helpers.js";
-const VITEST_ENV = /@(vitest|jest)-environment\s+(\S+)/g;
+const VITEST_ENV = /@(vitest)-environment\s+(\S+)/g;
export const collectCustomImports = (sourceFile) => {
Expand Down
Loading
Loading