diff --git a/.npmrc b/.npmrc deleted file mode 100644 index cec13c7f8cabe4..00000000000000 --- a/.npmrc +++ /dev/null @@ -1,53 +0,0 @@ -lockfile=false - -# If we are using a lockfile, ensure we use the newest format, which is a lot -# more readable when it comes to pnpm's peer dep resolution. -use-lockfile-v6=true - -# As of pnpm v8, the default is "lowest", selecting the minimum version -# available in the package graph. But, on DT, we want to test the latest of -# everything. -resolution-mode=highest - -# Prevent pnpm from hoisting eslint/prettier-ish packages. -# The first two are the defaults, but we don't want to also hoist packages -# like @types/eslint-scope (which exist in the types dir). -public-hoist-pattern[]=*eslint* -public-hoist-pattern[]=*prettier* -public-hoist-pattern[]=!@types/* - -# Match npm's behavior and ensure we get all deps. -auto-install-peers=true -# Don't complain about peer dependencies; they're out of our control. -strict-peer-dependencies=false -# Don't use the top-level package.json to resolve conflicts. -resolve-peers-from-workspace-root=false -# https://github.com/pnpm/pnpm/issues/6300 -dedupe-peer-dependents=false - -# This is a variant of ignore-scripts which only applies to external -# dependencies, allowing the repo to have its own scripts if needed while still -# stopping random downloaded deps from executing code. -# TODO: use this once https://github.com/pnpm/pnpm/issues/7139 is fixed or we -# change shared-workspace-lockfile back to true. -# onlyBuiltDependencies also does not work, otherwise that'd be superior to either. -# ignore-dep-scripts=true -ignore-scripts=true - -# Ensure that @types packages are resolved to this repo's packages where -# available. -prefer-workspace-packages=true -# And also to transitive dependencies. -link-workspace-packages=deep -# For manual invocations of `pnpm add`, don't save deps as "workspace:...". -save-workspace-protocol=false -# Ignore cycles; they are out of our control. -ignore-workspace-cycles=true -# Don't pull symlinks up out of workspace packages. -dedupe-direct-deps=false -# Don't allow every package to see every other package. -hoist-workspace-packages=false - -# Remove once https://github.com/pnpm/pnpm/issues/6457 is fixed -# and we can set a hoisting limit of "workspaces" like in Yarn. -shared-workspace-lockfile=false diff --git a/package.json b/package.json index 020ffd004d69ca..f3001271aa3546 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,9 @@ "bugs": { "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" }, - "packageManager": "pnpm@9.14.4", + "packageManager": "pnpm@10.30.1+sha512.3590e550d5384caa39bd5c7c739f72270234b2f6059e13018f975c313b1eb9fefcc09714048765d4d9efe961382c312e624572c0420762bdc5d5940cdf9be73a", "engines": { - "pnpm": ">=9.14.4", - "node": ">=18.12" + "node": ">=20.17.0" }, "scripts": { "preinstall": "npx only-allow pnpm", diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index fcc4e30544cf45..42cf612ec96fcf 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,53 @@ packages: - 'scripts' - 'types/**' + +lockfile: false + +# As of pnpm v8, the default is "lowest", selecting the minimum version +# available in the package graph. But, on DT, we want to test the latest of +# everything. +resolutionMode: highest + +# Do not delay installing things; we need to check the latest state. +minimumReleaseAge: 0 + +# Prevent pnpm from hoisting eslint/prettier-ish packages. +# The first two are the defaults, but we don't want to also hoist packages +# like @types/eslint-scope (which exist in the types dir). +publicHoistPattern: + - '*eslint*' + - '*prettier*' + - '!@types/*' + +# Match npm's behavior and ensure we get all deps. +autoInstallPeers: true +# Don't complain about peer dependencies; they're out of our control. +strictPeerDependencies: false +# Don't use the top-level package.json to resolve conflicts. +resolvePeersFromWorkspaceRoot: false +# https://github.com/pnpm/pnpm/issues/6300 +dedupePeerDependents: false + +ignoreScripts: true + +# Ensure that @types packages are resolved to this repo's packages where +# available. +preferWorkspacePackages: true +# And also to transitive dependencies. +linkWorkspacePackages: deep +# For manual invocations of `pnpm add`, don't save deps as "workspace:...". +saveWorkspaceProtocol: false +# Ignore cycles; they are out of our control. +ignoreWorkspaceCycles: true +# Don't pull symlinks up out of workspace packages. +dedupeDirectDeps: false +# Don't allow every package to see every other package. +hoistWorkspacePackages: false + +# Remove once https://github.com/pnpm/pnpm/issues/6457 is fixed +# and we can set a hoisting limit of "workspaces" like in Yarn. +sharedWorkspaceLockfile: false + +overrides: + '@wordpress/vips': '-' diff --git a/scripts/clean-node-modules.js b/scripts/clean-node-modules.js index 932f5d6d17bcf4..dbc83a969983d8 100644 --- a/scripts/clean-node-modules.js +++ b/scripts/clean-node-modules.js @@ -35,4 +35,10 @@ function rimraf(p) { for (const nodeModules of iterateNodeModules(repoRoot)) { console.log(path.relative(repoRoot, nodeModules)); rimraf(nodeModules); + + const lockfile = path.join(path.dirname(nodeModules), "pnpm-lock.yaml"); + if (fs.existsSync(lockfile)) { + console.log(path.relative(repoRoot, lockfile)); + fs.unlinkSync(lockfile); + } } diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index b5cf06c493c6ee..2125fd396f3cf7 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -692,9 +692,16 @@ declare namespace chrome { /** @deprecated Bookmark write operations are no longer limited by Chrome. */ export const MAX_WRITE_OPERATIONS_PER_HOUR: 1000000; + /** @deprecated Bookmark write operations are no longer limited by Chrome. */ export const MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE: 1000000; + /** + * The `id` associated with the root level node. + * @since Chrome 145 + */ + export const ROOT_NODE_ID = "0"; + /** * Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it will be a folder. * @@ -11047,6 +11054,11 @@ declare namespace chrome { height?: number | undefined; /** The session ID used to uniquely identify a tab obtained from the {@link sessions} API. */ sessionId?: string | undefined; + /** + * The ID of the Split View that the tab belongs to. + * @since Chrome 145 + */ + splitViewId?: number | undefined; /** * The ID of the group that the tab belongs to. * @since Chrome 88 @@ -11118,6 +11130,12 @@ declare namespace chrome { */ export const MAX_CAPTURE_VISIBLE_TAB_CALLS_PER_SECOND = 2; + /** + * An ID that represents the absence of a split tab. + * @since Chrome 145 + */ + export const SPLIT_VIEW_ID_NONE: -1; + /** * An ID that represents the absence of a browser tab. * @since Chrome 46 @@ -14083,6 +14101,30 @@ declare namespace chrome { responseHeaders?: HeaderInfo[]; } + /** @since Chrome 145 */ + export enum RuleConditionKeys { + URL_FILTER = "urlFilter", + REGEX_FILTER = "regexFilter", + IS_URL_FILTER_CASE_SENSITIVE = "isUrlFilterCaseSensitive", + INITIATOR_DOMAINS = "initiatorDomains", + EXCLUDED_INITIATOR_DOMAINS = "excludedInitiatorDomains", + REQUEST_DOMAINS = "requestDomains", + EXCLUDED_REQUEST_DOMAINS = "excludedRequestDomains", + TOP_DOMAINS = "topDomains", + EXCLUDED_TOP_DOMAINS = "excludedTopDomains", + DOMAINS = "domains", + EXCLUDED_DOMAINS = "excludedDomains", + RESOURCE_TYPES = "resourceTypes", + EXCLUDED_RESOURCE_TYPES = "excludedResourceTypes", + REQUEST_METHODS = "requestMethods", + EXCLUDED_REQUEST_METHODS = "excludedRequestMethods", + DOMAIN_TYPE = "domainType", + TAB_IDS = "tabIds", + EXCLUDED_TAB_IDS = "excludedTabIds", + RESPONSE_HEADERS = "responseHeaders", + EXCLUDED_RESPONSE_HEADERS = "excludedResponseHeaders", + } + export interface MatchedRule { /** A matching rule's ID. */ ruleId: number; @@ -14303,6 +14345,11 @@ declare namespace chrome { responseHeaders?: { [name: string]: unknown }; /** The ID of the tab in which the hypothetical request takes place. Does not need to correspond to a real tab ID. Default is -1, meaning that the request isn't related to a tab. */ tabId?: number; + /** + * The associated top-level frame URL (if any) for the request. + * @since Chrome 145 + */ + topUrl?: string; /** The resource type of the hypothetical request. */ type: `${ResourceType}`; /** The URL of the hypothetical request. */ diff --git a/types/chrome/test/index.ts b/types/chrome/test/index.ts index b6c5122fa14511..1f903a0736e583 100644 --- a/types/chrome/test/index.ts +++ b/types/chrome/test/index.ts @@ -26,6 +26,8 @@ function testBookmarks() { chrome.bookmarks.MAX_WRITE_OPERATIONS_PER_HOUR === 1000000; + chrome.bookmarks.ROOT_NODE_ID === "0"; + const bookmarkDetails: chrome.bookmarks.CreateDetails = { index: 0, parentId: "1", @@ -3214,6 +3216,8 @@ async function testTabs() { chrome.tabs.MutedInfoReason.EXTENSION === "extension"; chrome.tabs.MutedInfoReason.USER === "user"; + chrome.tabs.SPLIT_VIEW_ID_NONE === -1; + chrome.tabs.TAB_ID_NONE === -1; chrome.tabs.TAB_INDEX_NONE === -1; @@ -4021,6 +4025,27 @@ async function testDeclarativeNetRequest() { chrome.declarativeNetRequest.RuleActionType.REDIRECT === "redirect"; chrome.declarativeNetRequest.RuleActionType.UPGRADE_SCHEME === "upgradeScheme"; + chrome.declarativeNetRequest.RuleConditionKeys.DOMAINS === "domains"; + chrome.declarativeNetRequest.RuleConditionKeys.DOMAIN_TYPE === "domainType"; + chrome.declarativeNetRequest.RuleConditionKeys.EXCLUDED_DOMAINS === "excludedDomains"; + chrome.declarativeNetRequest.RuleConditionKeys.EXCLUDED_INITIATOR_DOMAINS === "excludedInitiatorDomains"; + chrome.declarativeNetRequest.RuleConditionKeys.EXCLUDED_REQUEST_DOMAINS === "excludedRequestDomains"; + chrome.declarativeNetRequest.RuleConditionKeys.EXCLUDED_REQUEST_METHODS === "excludedRequestMethods"; + chrome.declarativeNetRequest.RuleConditionKeys.EXCLUDED_RESOURCE_TYPES === "excludedResourceTypes"; + chrome.declarativeNetRequest.RuleConditionKeys.EXCLUDED_RESPONSE_HEADERS === "excludedResponseHeaders"; + chrome.declarativeNetRequest.RuleConditionKeys.EXCLUDED_TAB_IDS === "excludedTabIds"; + chrome.declarativeNetRequest.RuleConditionKeys.EXCLUDED_TOP_DOMAINS === "excludedTopDomains"; + chrome.declarativeNetRequest.RuleConditionKeys.INITIATOR_DOMAINS === "initiatorDomains"; + chrome.declarativeNetRequest.RuleConditionKeys.IS_URL_FILTER_CASE_SENSITIVE === "isUrlFilterCaseSensitive"; + chrome.declarativeNetRequest.RuleConditionKeys.REGEX_FILTER === "regexFilter"; + chrome.declarativeNetRequest.RuleConditionKeys.REQUEST_DOMAINS === "requestDomains"; + chrome.declarativeNetRequest.RuleConditionKeys.REQUEST_METHODS === "requestMethods"; + chrome.declarativeNetRequest.RuleConditionKeys.RESOURCE_TYPES === "resourceTypes"; + chrome.declarativeNetRequest.RuleConditionKeys.RESPONSE_HEADERS === "responseHeaders"; + chrome.declarativeNetRequest.RuleConditionKeys.TAB_IDS === "tabIds"; + chrome.declarativeNetRequest.RuleConditionKeys.TOP_DOMAINS === "topDomains"; + chrome.declarativeNetRequest.RuleConditionKeys.URL_FILTER === "urlFilter"; + chrome.declarativeNetRequest.SESSION_RULESET_ID === "_session"; chrome.declarativeNetRequest.UnsupportedRegexReason.MEMORY_LIMIT_EXCEEDED === "memoryLimitExceeded"; @@ -4131,6 +4156,7 @@ async function testDeclarativeNetRequest() { tabId: 1, initiator: "https://example.com", method: "get", + topUrl: "https://example.com", responseHeaders: {}, }; diff --git a/types/nodemailer/lib/smtp-connection/index.d.ts b/types/nodemailer/lib/smtp-connection/index.d.ts index 603fb7f67d9e92..bf692fee476d42 100644 --- a/types/nodemailer/lib/smtp-connection/index.d.ts +++ b/types/nodemailer/lib/smtp-connection/index.d.ts @@ -137,6 +137,8 @@ declare namespace SMTPConnection { auth?: AuthenticationType | undefined; /** defines if the connection should use SSL (if true) or not (if false) */ secure?: boolean | undefined; + /** indicates that the provided socket has already been upgraded to TLS (if true) */ + secured?: boolean | undefined; /** turns off STARTTLS support if true */ ignoreTLS?: boolean | undefined; /** forces the client to use STARTTLS. Returns an error if upgrading the connection is not possible or fails. */ diff --git a/types/nodemailer/nodemailer-tests.ts b/types/nodemailer/nodemailer-tests.ts index f0257a0343a004..967dde403b3acd 100644 --- a/types/nodemailer/nodemailer-tests.ts +++ b/types/nodemailer/nodemailer-tests.ts @@ -1478,7 +1478,7 @@ function dkim_specific_header_key_test() { // SMTP Connection function smtp_connection_test() { - const connection = new SMTPConnection(); + const connection = new SMTPConnection({ secure: true, secured: true }); connection.connect(err => { if (err) throw err; connection.login({ user: "user", pass: "pass" }, err => { diff --git a/types/nodemailer/v6/lib/smtp-connection/index.d.ts b/types/nodemailer/v6/lib/smtp-connection/index.d.ts index 603fb7f67d9e92..bf692fee476d42 100644 --- a/types/nodemailer/v6/lib/smtp-connection/index.d.ts +++ b/types/nodemailer/v6/lib/smtp-connection/index.d.ts @@ -137,6 +137,8 @@ declare namespace SMTPConnection { auth?: AuthenticationType | undefined; /** defines if the connection should use SSL (if true) or not (if false) */ secure?: boolean | undefined; + /** indicates that the provided socket has already been upgraded to TLS (if true) */ + secured?: boolean | undefined; /** turns off STARTTLS support if true */ ignoreTLS?: boolean | undefined; /** forces the client to use STARTTLS. Returns an error if upgrading the connection is not possible or fails. */ diff --git a/types/nodemailer/v6/nodemailer-tests.ts b/types/nodemailer/v6/nodemailer-tests.ts index 0c676b54267597..19520d82848da4 100644 --- a/types/nodemailer/v6/nodemailer-tests.ts +++ b/types/nodemailer/v6/nodemailer-tests.ts @@ -1448,7 +1448,7 @@ function dkim_specific_header_key_test() { // SMTP Connection function smtp_connection_test() { - const connection = new SMTPConnection(); + const connection = new SMTPConnection({ secure: true, secured: true }); connection.connect(err => { if (err) throw err; connection.login({ user: "user", pass: "pass" }, err => { diff --git a/types/three/src/renderers/common/RenderPipeline.ts b/types/three/src/renderers/common/RenderPipeline.d.ts similarity index 100% rename from types/three/src/renderers/common/RenderPipeline.ts rename to types/three/src/renderers/common/RenderPipeline.d.ts