Update pnpm to v11 (#33573)
* Update pnpm to v11 * Handle breaking changes * Attach pnpm hash * Remove redundant packageManager fields * Make lint-staged happy * Lockfile pnpm itself too * Update pnpm/action-setup for better v11 compatibility * Specify types to make tsc happier * Fix permissions * Check ulimit * Specify minimumReleaseAgeExclude * Run desktop tests * Revert "Run desktop tests" This reverts commit 911eb0ba2e9237d4b28e3bdaaf8f10ba6f22e827. * Revert "Check ulimit" This reverts commit f09eb59d715ba30a2e7fc5dba17dde092bd9bf17. * Reapply "Check ulimit" This reverts commit 83227c19ff5d07db91b6586f407f56870b00c041. * Run desktop tests * Switch nodeLinker & remove app-builder-lib patch * Fix webpack.config.ts * Fix .stylelintrc.cjs * Fix `events` package * Makes types happier * Make knip happy * Fix hak build * Make jest happy * Make pnpm-link happy * Remove dead file * Run playwright tests * Fix linux hak permissions in ci * Test * Remove ulimit checks * Disable skip * Update nx * Tweak line endings * Update screenshot * Iterate * Webpack fallback `events` --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -112,7 +112,6 @@
|
||||
"hakDependencies": {
|
||||
"matrix-seshat": "4.3.0"
|
||||
},
|
||||
"packageManager": "pnpm@10.33.4+sha512.1c67b3b359b2d408119ba1ed289f34b8fc3c6873412bec6fd264fbdc82489e510fcbecb9ce9d22dae7f3b76269d8441046014bdca53b9979cd7a561ad631b800",
|
||||
"nx": {
|
||||
"includedScripts": []
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import childProcess, { type SpawnOptions } from "node:child_process";
|
||||
import { type Arch, type Target, TARGETS, getHost, isHostId, type TargetId } from "./target.ts";
|
||||
|
||||
async function getRuntimeVersion(projectRoot: string): Promise<string> {
|
||||
const electronVersion = await getElectronVersionFromInstalled(path.join(projectRoot, "..", ".."));
|
||||
const electronVersion = await getElectronVersionFromInstalled(projectRoot);
|
||||
if (!electronVersion) {
|
||||
throw new Error("Can't determine Electron version");
|
||||
}
|
||||
|
||||
@@ -62,10 +62,10 @@ module.exports = {
|
||||
{ from: "res/css/views/settings/tabs/_SettingsTab.pcss", type: "css" },
|
||||
{ from: "res/css/structures/_RoomView.pcss", type: "css" },
|
||||
// Compound vars
|
||||
"../../node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-common-base.css",
|
||||
"../../node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-common-semantic.css",
|
||||
"../../node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-theme-light-base-mq.css",
|
||||
"../../node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-theme-light-semantic-mq.css",
|
||||
"./node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-common-base.css",
|
||||
"./node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-common-semantic.css",
|
||||
"./node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-theme-light-base-mq.css",
|
||||
"./node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-theme-light-semantic-mq.css",
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -6,10 +6,14 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { env } from "process";
|
||||
import { env } from "node:process";
|
||||
import path, { dirname } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import type { Config } from "jest";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
const config: Config = {
|
||||
testEnvironment: "jest-fixed-jsdom",
|
||||
testEnvironmentOptions: {
|
||||
@@ -31,10 +35,8 @@ const config: Config = {
|
||||
"\\.(gif|png|ttf|woff2)$": "<rootDir>/__mocks__/imageMock.js",
|
||||
"\\.svg$": "<rootDir>/__mocks__/svg.js",
|
||||
"\\$webapp/i18n/languages.json": "<rootDir>/__mocks__/languages.json",
|
||||
"^react$": "<rootDir>/../../node_modules/react",
|
||||
"^react-dom$": "<rootDir>/../../node_modules/react-dom",
|
||||
"^matrix-js-sdk$": "<rootDir>/../../node_modules/matrix-js-sdk/src",
|
||||
"^matrix-react-sdk$": "<rootDir>/src",
|
||||
"^react$": "<rootDir>/node_modules/react",
|
||||
"^react-dom$": "<rootDir>/node_modules/react-dom",
|
||||
"decoderWorker\\.min\\.js": "<rootDir>/__mocks__/empty.js",
|
||||
"decoderWorker\\.min\\.wasm": "<rootDir>/__mocks__/empty.js",
|
||||
"waveWorker\\.min\\.js": "<rootDir>/__mocks__/empty.js",
|
||||
@@ -42,10 +44,10 @@ const config: Config = {
|
||||
"workers/(.+)Factory": "<rootDir>/__mocks__/workerFactoryMock.js",
|
||||
"^!!raw-loader!.*": "jest-raw-loader",
|
||||
"recorderWorkletFactory": "<rootDir>/__mocks__/empty.js",
|
||||
"@vector-im/compound-web": "<rootDir>/../../node_modules/@vector-im/compound-web",
|
||||
"@vector-im/compound-web": "<rootDir>/node_modules/@vector-im/compound-web",
|
||||
},
|
||||
transformIgnorePatterns: [
|
||||
"/node_modules/(?!(mime|matrix-js-sdk|uuid|p-retry|is-network-error|react-merge-refs|is-ip|ip-regex|super-regex|function-timeout|time-span|convert-hrtime|clone-regexp|is-regexp|matrix-web-i18n|await-lock|@element-hq/web-shared-components|react-virtuoso|lodash|domutils|domhandler|domelementtype|dom-serializer|entities)).+$",
|
||||
`${path.join(__dirname, "../..")}/node_modules/.pnpm/(?!(mime|uuid|p-retry|is-network-error|react-merge-refs|is-ip|ip-regex|super-regex|function-timeout|time-span|convert-hrtime|clone-regexp|is-regexp|matrix-web-i18n|await-lock|@element-hq/web-shared-components|react-virtuoso|lodash|domutils|domhandler|domelementtype|dom-serializer|entities)).+$`,
|
||||
],
|
||||
collectCoverageFrom: [
|
||||
"<rootDir>/src/**/*.{js,ts,tsx}",
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
"domutils": "^4.0.0",
|
||||
"emojibase-regex": "^17.0.0",
|
||||
"escape-html": "^1.0.3",
|
||||
"events": "^3.3.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"filesize": "11.0.17",
|
||||
"github-markdown-css": "^5.5.1",
|
||||
@@ -243,6 +244,5 @@
|
||||
"engines": {
|
||||
"node": ">=22.18"
|
||||
},
|
||||
"packageManager": "pnpm@10.33.4+sha512.1c67b3b359b2d408119ba1ed289f34b8fc3c6873412bec6fd264fbdc82489e510fcbecb9ce9d22dae7f3b76269d8441046014bdca53b9979cd7a561ad631b800",
|
||||
"private": true
|
||||
}
|
||||
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
+11
-3
@@ -369,6 +369,8 @@ export const LinkedTextConfiguration = {
|
||||
urlTargetTransformer: urlTargetTransformFunction,
|
||||
};
|
||||
|
||||
type LinkifyOpts = Parameters<typeof _linkifyString>[1];
|
||||
|
||||
/**
|
||||
* Linkifies the given string. This is a wrapper around 'linkifyjs/string'.
|
||||
*
|
||||
@@ -376,7 +378,10 @@ export const LinkedTextConfiguration = {
|
||||
* @param [options] Options for linkifyString.
|
||||
* @returns Linkified string
|
||||
*/
|
||||
export function linkifyString(value: string, options = generateLinkedTextOptions(LinkedTextConfiguration)): string {
|
||||
export function linkifyString(
|
||||
value: string,
|
||||
options: LinkifyOpts = generateLinkedTextOptions(LinkedTextConfiguration),
|
||||
): string {
|
||||
return _linkifyString(value, options);
|
||||
}
|
||||
|
||||
@@ -387,7 +392,10 @@ export function linkifyString(value: string, options = generateLinkedTextOptions
|
||||
* @param [options] Options for linkifyHtml.
|
||||
* @returns Linkified string
|
||||
*/
|
||||
export function linkifyHtml(value: string, options = generateLinkedTextOptions(LinkedTextConfiguration)): string {
|
||||
export function linkifyHtml(
|
||||
value: string,
|
||||
options: LinkifyOpts = generateLinkedTextOptions(LinkedTextConfiguration),
|
||||
): string {
|
||||
return _linkifyHtml(value, options);
|
||||
}
|
||||
|
||||
@@ -400,7 +408,7 @@ export function linkifyHtml(value: string, options = generateLinkedTextOptions(L
|
||||
*/
|
||||
export function linkifyAndSanitizeHtml(
|
||||
dirtyHtml: string,
|
||||
options = generateLinkedTextOptions(LinkedTextConfiguration),
|
||||
options: LinkifyOpts = generateLinkedTextOptions(LinkedTextConfiguration),
|
||||
): string {
|
||||
return sanitizeHtml(linkifyString(dirtyHtml, options), sanitizeHtmlParams);
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
/*
|
||||
Copyright 2024 New Vector Ltd.
|
||||
Copyright 2019 The Matrix.org Foundation C.I.C.
|
||||
Copyright 2015, 2016 OpenMarket Ltd
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
// Import the js-sdk so the proper `request` object can be set. This does some
|
||||
// magic with the browser injection to make all subsequent imports work fine.
|
||||
import "matrix-js-sdk/src/browser-index";
|
||||
@@ -74,8 +74,9 @@ export class ModuleApi implements Api {
|
||||
public readonly _registerLegacyRoomListCustomisations = legacyCustomisationsFactory(RoomListCustomisations);
|
||||
public readonly _registerLegacyUserIdentifierCustomisations =
|
||||
legacyCustomisationsFactory(UserIdentifierCustomisations);
|
||||
public readonly _registerLegacyWidgetPermissionsCustomisations =
|
||||
legacyCustomisationsFactory(WidgetPermissionCustomisations);
|
||||
public readonly _registerLegacyWidgetPermissionsCustomisations: (
|
||||
customisations: typeof WidgetPermissionCustomisations,
|
||||
) => void = legacyCustomisationsFactory(WidgetPermissionCustomisations);
|
||||
public readonly _registerLegacyWidgetVariablesCustomisations =
|
||||
legacyCustomisationsFactory(WidgetVariableCustomisations);
|
||||
/* eslint-enable @typescript-eslint/naming-convention */
|
||||
|
||||
@@ -258,7 +258,6 @@ export default (env: string, argv: Record<string, any>): webpack.Configuration =
|
||||
"$webapp": path.resolve(__dirname, "webapp"),
|
||||
|
||||
// Make shared-components imports resolve to EW deps
|
||||
"counterpart": getPackageRoot("counterpart"),
|
||||
"@vector-im/compound-web": getPackageRoot("@vector-im/compound-web", ""),
|
||||
},
|
||||
fallback: {
|
||||
@@ -267,6 +266,7 @@ export default (env: string, argv: Record<string, any>): webpack.Configuration =
|
||||
"net": false,
|
||||
"tls": false,
|
||||
"crypto": false,
|
||||
"events": import.meta.resolve("events/"),
|
||||
|
||||
// Polyfill needed by counterpart
|
||||
"util": import.meta.resolve("util/"),
|
||||
|
||||
Reference in New Issue
Block a user