mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-25 15:07:06 -04:00
chore(git): merge from main
This commit is contained in:
6
.changeset/ci-respect-explicit-gvs.md
Normal file
6
.changeset/ci-respect-explicit-gvs.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/config": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
CI no longer force-disables `enableGlobalVirtualStore` when it was explicitly set by the user. Previously, `ci: true` (auto-detected or configured) would unconditionally set `enableGlobalVirtualStore` to `false`, even when the user had explicitly enabled it in `pnpm-workspace.yaml` or via CLI. Now, only the default value is overridden in CI — explicit user configuration is respected.
|
||||
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
- name: Package compiled artifacts
|
||||
run: tar -czf compiled.tar.gz --exclude='node_modules' $(find . -type d -name lib -not -path '*/node_modules/*') $(find . -name 'tsconfig.tsbuildinfo' -not -path '*/node_modules/*') pnpm/dist
|
||||
- name: Upload compiled artifacts
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: compiled-packages
|
||||
path: compiled.tar.gz
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
run: pnpm install
|
||||
timeout-minutes: 3
|
||||
- name: Download compiled artifacts
|
||||
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
||||
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
|
||||
with:
|
||||
name: compiled-packages
|
||||
- name: Extract compiled artifacts
|
||||
|
||||
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -46,7 +46,7 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@19b2f06db2b6f5108140aeb04014ef02b648f789 # v4.31.11
|
||||
uses: github/codeql-action/init@c793b717bc78562f491db7b0e93a3a178b099162 # v4.32.5
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@19b2f06db2b6f5108140aeb04014ef02b648f789 # v4.31.11
|
||||
uses: github/codeql-action/autobuild@c793b717bc78562f491db7b0e93a3a178b099162 # v4.32.5
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -71,4 +71,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@19b2f06db2b6f5108140aeb04014ef02b648f789 # v4.31.11
|
||||
uses: github/codeql-action/analyze@c793b717bc78562f491db7b0e93a3a178b099162 # v4.32.5
|
||||
|
||||
2
.github/workflows/update-latest.yml
vendored
2
.github/workflows/update-latest.yml
vendored
@@ -63,7 +63,7 @@ jobs:
|
||||
steps:
|
||||
- name: Send toot to Mastodon
|
||||
id: mastodon
|
||||
uses: cbrgm/mastodon-github-action@3ebdc72dcd894e1be460179eb0d01835f3689b2f # v2.1.23
|
||||
uses: cbrgm/mastodon-github-action@fc8b40e2ec9e8208654b0bd8695e03ecc3364d7d # v2.1.26
|
||||
with:
|
||||
message: |
|
||||
pnpm@${{ github.event.inputs.version }} is out!
|
||||
|
||||
@@ -609,9 +609,11 @@ export async function getConfig (opts: {
|
||||
pnpmConfig.dev = true
|
||||
}
|
||||
|
||||
if (pnpmConfig.ci) {
|
||||
if (pnpmConfig.ci && pnpmConfig.enableGlobalVirtualStore == null) {
|
||||
// Using a global virtual store in CI makes little sense,
|
||||
// as there is never a warm cache in that environment.
|
||||
// as there is usually no warm cache in that environment.
|
||||
// However, if the user explicitly enabled GVS (e.g., for Nix builds
|
||||
// or CI systems with persistent caches), respect that setting.
|
||||
pnpmConfig.enableGlobalVirtualStore = false
|
||||
}
|
||||
|
||||
|
||||
@@ -1504,6 +1504,47 @@ test('pnpm_config_lockfile env var overrides lockfile from pnpm-workspace.yaml i
|
||||
expect(config.useLockfile).toBe(false)
|
||||
})
|
||||
|
||||
test('ci disables enableGlobalVirtualStore by default', async () => {
|
||||
prepareEmpty()
|
||||
|
||||
writeYamlFile('pnpm-workspace.yaml', {
|
||||
ci: true,
|
||||
})
|
||||
|
||||
const { config } = await getConfig({
|
||||
cliOptions: {},
|
||||
env,
|
||||
packageManager: {
|
||||
name: 'pnpm',
|
||||
version: '1.0.0',
|
||||
},
|
||||
workspaceDir: process.cwd(),
|
||||
})
|
||||
|
||||
expect(config.enableGlobalVirtualStore).toBe(false)
|
||||
})
|
||||
|
||||
test('ci respects explicit enableGlobalVirtualStore from config', async () => {
|
||||
prepareEmpty()
|
||||
|
||||
writeYamlFile('pnpm-workspace.yaml', {
|
||||
ci: true,
|
||||
enableGlobalVirtualStore: true,
|
||||
})
|
||||
|
||||
const { config } = await getConfig({
|
||||
cliOptions: {},
|
||||
env,
|
||||
packageManager: {
|
||||
name: 'pnpm',
|
||||
version: '1.0.0',
|
||||
},
|
||||
workspaceDir: process.cwd(),
|
||||
})
|
||||
|
||||
expect(config.enableGlobalVirtualStore).toBe(true)
|
||||
})
|
||||
|
||||
test('pnpm_config_git_branch_lockfile env var overrides git-branch-lockfile from pnpm-workspace.yaml in useGitBranchLockfile', async () => {
|
||||
prepareEmpty()
|
||||
|
||||
|
||||
508
pnpm-lock.yaml
generated
508
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,6 @@ test('using a global virtual store', async () => {
|
||||
const storeDir = path.resolve('store')
|
||||
const globalVirtualStoreDir = path.join(storeDir, 'v11/links')
|
||||
writeYamlFile(path.resolve('pnpm-workspace.yaml'), {
|
||||
ci: false, // We force CI=false because enableGlobalVirtualStore is always disabled in CI
|
||||
enableGlobalVirtualStore: true,
|
||||
storeDir,
|
||||
privateHoistPattern: '*',
|
||||
|
||||
@@ -50,7 +50,6 @@ test('pnpm list returns correct paths with global virtual store', async () => {
|
||||
},
|
||||
})
|
||||
writeYamlFile('pnpm-workspace.yaml', {
|
||||
ci: false, // enableGlobalVirtualStore is always disabled in CI
|
||||
enableGlobalVirtualStore: true,
|
||||
storeDir: path.resolve('store'),
|
||||
privateHoistPattern: '*',
|
||||
|
||||
Reference in New Issue
Block a user