Khải
72cff38486
refactor: pass whole registries to the resolver ( #9375 )
2025-04-04 01:20:16 +02:00
Khải
e32b1a29e9
feat: update injected packages after run ( #9100 )
...
* feat: update injected packages after run (wip)
close #9081
* refactor: rename field
* feat: injectedPackages (wip)
* feat: findInjectedPackages (wip)
* feat: complete implementation
* test: findInjectedPackages
* docs: changeset
* refactor: be lazy
* chore: set `version` to `1000.0.0-0`
* feat: use hardlinks for injected packages
* refactor: just use `.modules.yaml`
* feat: debug logger
* refactor: `modulesDir` is unnecessary
* test: shouldUpdateInjectedFilesAfterRun
* fix(test): remove the test command
* test: updateInjectedPackagesAfterRun
* fix: eslint
* feat: rename config
* perf: diff to reduce fs operations
* perf: load source map only once
* chore(deps): remove unused dependencies
* fix: eslint
* refactor: use `symlink-dir`
* refactor: move type expr to an alias
* refactor: simplify types
* feat: reuse stats from the directory fetcher
* test: directories and symlinks
* feat: sort alphabetic
* test: diffDir
* test: rename a test
* test: remove nesting
* refactor: rename
* feat: remove buggy symlink support
* test: applyPatch
* docs: correct
* docs: fix
* test: extendFilesMap
* docs: remove outdated comment
* docs: remove unneeded comment
* test: fix
* test: more assertions
* test: DirPatcher
* test: more assertions
* test: more assertions
* test: just use `createDir`
* test: multiple patchers
* test: reuse stat results
* docs: consistent grammar
* test: workaround
* test: fix windows
* refactor: remove single-use `makeParent`
* refactor: remove nonsense test
How could I even misunderstand my own code?!
`Patcher.apply()` will never call stat on the files because they have all
been loaded to calculate `Patcher.patch`.
This test is therefore nonsense.
* feat: rename
* feat: rename again
* feat: remove `boolean`
* fix: broken lockfile
* test: use a fixture for testing sync injected deps
* test: refactor syne injected deps test
* test: refactor sync injected deps test
* test: refactor sync injected deps test
* refactor: rename injected deps to syncer
* refactor: change injected deps logger
* docs: update changeset
---------
Co-authored-by: Zoltan Kochan <z@kochan.io >
2025-02-24 02:09:45 +01:00
Zoltan Kochan
c52f55af30
refactor: create exec.pnpm-cli-runner ( #9064 )
2025-02-08 22:34:19 +01:00
Zoltan Kochan
7d7c51ecd6
feat!: dlx should use exact versions of packages in the cache key ( #8811 )
...
close #8722
2024-11-27 09:04:42 +01:00
Khải
19d5b51558
feat(exec): check dependencies before running scripts ( #8645 )
...
* refactor: break a long line into multiple lines
* feat: cache that tracks workspace structures
* feat: handle hash collisions
* docs(changeset): packages-list-cache
* feat(packages-list-cache): store mtime
* fix(packages-list-cache): JSON5 and YAML manifests
* feat(packages-list-cache): add catalogs
* style: sort fields alphabetically
* fix: actually fix it
* lint: fix
* lint: fix
* test(packages-list-cache): test
* feat(exec): check deps before run scripts
Resolves https://github.com/pnpm/pnpm/issues/8585
* style: fix eslint
* feat: use a single lastValidatedTimestamp
* refactor: rearrange
* perf: don't do pointless comparisons
* perf: optimize non-workspace
* perf: optimize sharedWorkspaceLockfile=false
* perf: remove unnecessary fs reads
* refactor: statManifestFile
* perf: skip comparing manifest to lockfile by stats
* feat: add wantedLockfileDir to error message
* refactor: shorten a function name
* refactor: rename a function
* docs: improve wordings
* feat: export `linkedPackagesAreUpToDate`
* feat: make sure lockfile specs satisfy manifest (wip)
* docs: todo
* fix: projectId
* feat: skip install-related scripts
* fix: type errors
* refactor: use tagged union
* refactor: remove unnecessary type expression
* docs: todo
* feat: add linkedPackagesAreUpToDate (wip)
* refactor: rearrange fields
* refactor: remove a temporary variable
* feat: export `getWorkspacePackagesByDirectory`
* feat: make workspacePackages optional
* feat: complete `linkedPackagesAreUpToDate`
* docs: remove unapplicable todo
* docs: explain why check is skipped
* feat: load allProjects and try again
* refactor: remove unused dependencies
* refactor: remove commented-out code
* refactor: replace `else if` with `return`
* feat: use-case without workspace manifest
* perf: skip unnecessary work
* feat: add a guard
* fix: eslint
* refactor: move code to new package
* refactor: sort dependencies
* test: outline
* refactor: extract assertLockfilesEqual for testing
* test: skip failing tests for now
* fix: eslint
* test: assertLockfilesEqual
* refactor: extract statManifestFile for testing
* test: todo
* test: statManifestFile
* test: shouldRunCheck
* refactor: rename a test file
* test: add
* test: todo
* docs: remove a commented-out code
* test: create groups
* test: todo
* test: add
* test: platform agnostic
* test: remove unnecessary scripts
* test: use `assert.strictEqual` instead
* test: export bin locations
* test: nested `pnpm run`
* test: todo
* test: add `cwd` option to `execPnpmSync`
* test: add
* fix: recursive
* test: add
* test: fix package names
* fix: catalogs comparison
* test: add
* refactor: just use ramda filter
* test: add
* test: mutations
* fix: package.json
* fix: jest
* feat(packages-list): debug logs
* feat: add debug messages
* fix: eslint
* test: check debug messages in other case
* docs: add next step
* test: mtime updates without modification
* docs: correct test description
* test: mtime changes
* test: check should be skipped
* docs: remove fulfilled todos
* fix: remove `.only`
* docs: todo
* docs: correct test names
* test: workspace structure changes
* test: packages list cache
* test: add
* refactor: divide a test file into 2
* docs: consistent wordings
* refactor: clearer error messages
* fix: ignore check in recursive nested scripts
* test: no dependencies
* test: print error messages on failures
* test: improve stdout/stderr in error messages
* docs: consistent wordings
* docs: clarify what did what
* test: nested script
* docs: consistent test descriptions
* docs(changeset): correction
* fix: save catalogs to packages list
* test: catalogs
* test: fix
* test: fix windows
* refactor: remove unused option field
* refactor: prefer `!= null`
* feat: use `node_modules` instead
* refactor: rename a package
* refactor: apply suggestion
* refactor: remove workspaceDir
* refactor: move `shouldRunCheck` to `exec`
* feat: rename config key
* refactor: rename a test dir
* refactor: correct grammar
* refactor: make loadPackagesList sync
* test: multiple lockfiles
* feat: prevent deletion of `node_modules`
* feat: skip checking on filtered install
* fix: accidentally dropping catalogs
* refactor: remove unnecessary `Promise.all`
* refactor: use `virtualStoreDir` from config
* refactor: split `opts` into `ctx` and `opts`
* test: fix
* style: fix eslint
* test: fix windows
* feat(exec): add `verifyDepsBeforeRun` to `exec`
* refactor: sync stat
* feat: stop ignoring filtered install
* test: filtered install
* refactor: rearrange imports
* feat: rename "packages list" to "workspace state"
* test: fix
* fix: workspace state on failed install
2024-11-15 01:01:09 +01:00
Zoltan Kochan
f10256d088
feat!: use SHA256 for creating cache keys for dlx ( #8531 )
2024-09-16 02:36:06 +02:00
Khải
5bf6aaa407
refactor: move @pnpm/logger to the monorepo ( #8385 )
...
* chore: create @pnpm/logger
* fix: workaround typescript error
* chore: update manifests
* chore(deps): link @pnpm/logger from workspace
2024-08-07 18:02:08 +02:00
Zoltan Kochan
26b065c193
feat: automatically switch to the right pnpm version ( #8363 )
...
close #8360
2024-08-06 21:59:43 +02:00
Khải
98f20a70b6
fix(dlx): use-node-version ( #8263 )
2024-07-02 00:37:19 +02:00
Brandon Cheng
75a98e12b3
refactor: improve type checking when finding workspace packages ( #8214 )
...
---------
Co-authored-by: Zoltan Kochan <z@kochan.io >
2024-06-17 17:34:54 +02:00
Khải
bc0618cf19
feat(exec): log prefix ( #8151 )
...
close #8065
2024-06-03 01:25:21 +02:00
Brandon Cheng
5de89d81a6
chore: remove top-level composite property from tsconfig.json files ( #8130 )
...
* chore: remove no-op composite property
* chore: remove top-level composite property from existing files
2024-05-28 02:37:40 +02:00
Khải
98566d95bc
feat(dlx): cache ( #7835 )
...
close #5277
---------
Co-authored-by: Zoltan Kochan <z@kochan.io >
2024-04-09 03:30:58 +02:00
Brandon Cheng
a2f5f5c990
test: fix file system race conditions in tests by switching to an IPC server ( #7472 )
...
* test: create new @pnpm/test-ipc-server private util package
* test: use @pnpm/test-ipc-server for previously refactored tests
* test: use @pnpm/test-ipc-server for tests using json-append
* test: change how --no-bail is passed to avoid passing it to scripts
This test began failing after the conversion to use
`@pnpm/test-echo-server` since the `--no-bail` script was being passed
to scripts.
Changing how --no-bail is configured to fix this test.
* test: use @pnpm/test-ipc-server in exec/lifecycle fixture tests
* test: use @pnpm/test-ipc-server in pkg-manager/headless fixture tests
* test: use @pnpm/test-ipc-server in exec/prepare-package fixture tests
* test: switch pnpm test from json-append to @pnpm.e2e/hello-world-js-bin
* test: fix and re-enable 'rebuild multiple packages in correct order'
The pnpm-workspace.yaml file didn't contain all packages, causing:
```
2023-12-22T02:24:46.2277155Z FAIL test/recursive.ts
2023-12-22T02:24:46.2277881Z ● rebuild multiple packages in correct order
2023-12-22T02:24:46.2278348Z
2023-12-22T02:24:46.2278734Z expect(received).toStrictEqual(expected) // deep equality
2023-12-22T02:24:46.2279302Z
2023-12-22T02:24:46.2279517Z - Expected - 1
2023-12-22T02:24:46.2279932Z + Received + 0
2023-12-22T02:24:46.2280186Z
2023-12-22T02:24:46.2280791Z Array [
2023-12-22T02:24:46.2281256Z "project-1",
2023-12-22T02:24:46.2281733Z - "project-2",
2023-12-22T02:24:46.2282135Z ]
2023-12-22T02:24:46.2282334Z
2023-12-22T02:24:46.2282475Z 216 | }, [])
2023-12-22T02:24:46.2282870Z 217 |
2023-12-22T02:24:46.2283788Z > 218 | expect(server1.getMessages()).toStrictEqual(['project-1', 'project-2'])
2023-12-22T02:24:46.2284725Z | ^
2023-12-22T02:24:46.2285802Z 219 | expect(server2.getMessages()).toStrictEqual(['project-1', 'project-3'])
2023-12-22T02:24:46.2286683Z 220 | })
2023-12-22T02:24:46.2287049Z 221 |
2023-12-22T02:24:46.2287269Z
2023-12-22T02:24:46.2287588Z at Object.<anonymous> (test/recursive.ts:218:33)
```
2024-01-01 16:40:03 +01:00
Zoltan Kochan
583e3954be
fix: remove suppressImplicitAnyIndexErrors from typescript settings ( #5991 )
2023-01-28 18:19:26 +02:00
Zoltan Kochan
9cbe293876
refactor: put all non-public projects to directories that start with __
2022-11-20 02:40:44 +02:00
Zoltan Kochan
4ca53b0b50
refactor: group projects in different subdirectories ( #5659 )
2022-11-20 01:35:22 +02:00