Merge branch 'main' into v10

This commit is contained in:
Zoltan Kochan
2024-10-25 22:24:10 +02:00
308 changed files with 659 additions and 305 deletions

View File

@@ -0,0 +1,5 @@
---
"pnpm": patch
---
Fix a bug causing pnpm to infinitely spawn itself when `manage-package-manager-versions=true` is set and the `.tools` directory is corrupt.

View File

@@ -0,0 +1,5 @@
---
"pnpm": patch
---
When `manage-package-manager-versions` is set to `true`, errors spawning a self-managed version of `pnpm` will now be shown (instead of being silent).

View File

@@ -319,6 +319,13 @@ async function updateManifest (workspaceDir: string, manifest: ProjectManifest,
}
delete manifest.dependencies['@types/ramda']
}
if (scripts.test) {
Object.assign(manifest, {
jest: {
preset: '@pnpm/jest-config',
},
})
}
return {
...manifest,
bugs: {

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config')

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config')

View File

@@ -1,4 +1,4 @@
const path = require("path")
const path = require('path')
const config = {
preset: "ts-jest",
@@ -15,8 +15,9 @@ const config = {
collectCoverage: true,
coveragePathIgnorePatterns: ["/node_modules/"],
testPathIgnorePatterns: ["/fixtures/", "/__fixtures__/", "<rootDir>/test/utils/.+"],
modulePathIgnorePatterns: ['\/__fixtures__\/.*'],
testTimeout: 4 * 60 * 1000, // 4 minutes
setupFilesAfterEnv: [path.join(__dirname, "jest.setup.js")],
setupFilesAfterEnv: [path.join(__dirname, "setupFilesAfterEnv.js")],
maxWorkers: "50%",
}

View File

@@ -1,4 +1,6 @@
const { start, prepare } = require('@pnpm/registry-mock')
const { promisify } = require('util')
const kill = promisify(require('tree-kill'))
module.exports = () => {
if (process.env.PNPM_REGISTRY_MOCK_PORT == null) return
@@ -22,6 +24,6 @@ module.exports = () => {
})
global.killServer = () => {
killed = true
server.kill()
return kill(server.pid)
}
}

View File

@@ -0,0 +1,3 @@
module.exports = () => {
return global.killServer?.()
}

View File

@@ -0,0 +1,16 @@
const path = require('path')
const baseConfig = require('./config')
if (process.env.PNPM_REGISTRY_MOCK_PORT != null) {
module.exports = {
...baseConfig,
// Many tests change the dist tags of packages.
// Unfortunately, this means that if two such tests will run at the same time,
// they may break each other.
maxWorkers: 1,
globalSetup: path.join(__dirname, 'globalSetup.js'),
globalTeardown: path.join(__dirname, 'globalTeardown.js'),
}
} else {
module.exports = baseConfig
}

View File

@@ -0,0 +1,14 @@
{
"name": "@pnpm/jest-config",
"version": "1.0.0",
"private": true,
"main": "jest-preset.js",
"dependencies": {
"@pnpm/registry-mock": "catalog:",
"@pnpm/worker": "workspace:*",
"tree-kill": "catalog:"
},
"devDependencies": {
"@pnpm/jest-config": "workspace:*"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config')

View File

@@ -46,5 +46,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,2 +0,0 @@
module.exports = require('../../jest-with-registry.config.js')

View File

@@ -34,8 +34,8 @@
"@pnpm/logger": "workspace:*",
"@pnpm/prepare": "workspace:*",
"@pnpm/registry-mock": "catalog:",
"@zkochan/rimraf": "catalog:",
"@types/ramda": "catalog:",
"@zkochan/rimraf": "catalog:",
"execa": "catalog:"
},
"dependencies": {
@@ -54,5 +54,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config.js')

View File

@@ -40,5 +40,8 @@
"@pnpm/catalogs.config": "workspace:*",
"@pnpm/catalogs.types": "workspace:*",
"@pnpm/workspace.read-manifest": "workspace:*"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config.js')

View File

@@ -35,5 +35,8 @@
},
"devDependencies": {
"@pnpm/catalogs.protocol-parser": "workspace:*"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config.js')

View File

@@ -40,5 +40,8 @@
"devDependencies": {
"@pnpm/catalogs.resolver": "workspace:*",
"@pnpm/catalogs.types": "workspace:*"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -34,5 +34,8 @@
},
"devDependencies": {
"@pnpm/catalogs.types": "workspace:*"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js');
module.exports = Object.assign({}, config, {});

View File

@@ -38,5 +38,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js');
module.exports = Object.assign({}, config, {});

View File

@@ -52,5 +52,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -36,5 +36,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -33,5 +33,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config')

View File

@@ -69,5 +69,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js');
module.exports = config

View File

@@ -42,5 +42,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest-with-registry.config.js')

View File

@@ -49,5 +49,8 @@
"keywords": [
"pnpm9"
],
"homepage": "https://github.com/pnpm/pnpm/blob/main/completion/plugin-commands-completion#readme"
"homepage": "https://github.com/pnpm/pnpm/blob/main/completion/plugin-commands-completion#readme",
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js');
module.exports = Object.assign({}, config, {});

View File

@@ -70,5 +70,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config.js')

View File

@@ -40,5 +40,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -38,5 +38,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config')

View File

@@ -50,5 +50,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config')

View File

@@ -39,5 +39,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config')

View File

@@ -36,5 +36,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js')
module.exports = config

View File

@@ -49,5 +49,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js');
module.exports = Object.assign({}, config, {});

View File

@@ -39,5 +39,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js');
module.exports = Object.assign({}, config, {});

View File

@@ -41,5 +41,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -34,5 +34,8 @@
"homepage": "https://github.com/pnpm/pnpm/blob/main/crypto/polyfill#readme",
"devDependencies": {
"@pnpm/crypto.polyfill": "workspace:*"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config')

View File

@@ -39,5 +39,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config')

View File

@@ -40,5 +40,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -32,5 +32,8 @@
"funding": "https://opencollective.com/pnpm",
"devDependencies": {
"@pnpm/dedupe.types": "workspace:*"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -53,5 +53,8 @@
"@pnpm/types": "workspace:*",
"path-exists": "catalog:",
"ramda": "catalog:"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config.js')

View File

@@ -35,5 +35,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js')
module.exports = config

View File

@@ -52,5 +52,8 @@
"@pnpm/prepare": "workspace:*",
"@types/adm-zip": "catalog:",
"node-fetch": "catalog:"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js')
module.exports = config

View File

@@ -44,5 +44,8 @@
"@pnpm/fetch": "workspace:*",
"@pnpm/node.resolver": "workspace:*",
"@types/semver": "catalog:"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js')
module.exports = config

View File

@@ -38,5 +38,8 @@
},
"devDependencies": {
"@pnpm/env.path": "workspace:*"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js')
module.exports = config

View File

@@ -72,5 +72,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js')
module.exports = config

View File

@@ -40,5 +40,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config')

View File

@@ -58,5 +58,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config.js')

View File

@@ -61,5 +61,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -37,5 +37,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest-with-registry.config.js')

View File

@@ -87,5 +87,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest-with-registry.config.js')

View File

@@ -80,5 +80,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js');
module.exports = Object.assign({}, config, {});

View File

@@ -49,5 +49,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -37,5 +37,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config.js')

View File

@@ -49,5 +49,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -41,5 +41,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config.js')

View File

@@ -51,5 +51,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config.js')

View File

@@ -35,5 +35,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config')

View File

@@ -68,5 +68,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config.js')

View File

@@ -42,5 +42,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js');
module.exports = Object.assign({}, config, {});

View File

@@ -37,5 +37,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1 +0,0 @@
module.exports = require('../../jest.config.js')

View File

@@ -40,5 +40,8 @@
},
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js');
module.exports = Object.assign({}, config, {});

View File

@@ -65,5 +65,8 @@
"funding": "https://opencollective.com/pnpm",
"exports": {
".": "./lib/index.js"
},
"jest": {
"preset": "@pnpm/jest-config"
}
}

View File

@@ -1,3 +0,0 @@
const config = require('../../jest.config.js');
module.exports = Object.assign({}, config, {});

Some files were not shown because too many files have changed in this diff Show More