Commit Graph

7965 Commits

Author SHA1 Message Date
Brandon Cheng
09065b8a78 fix(dependencies-hierarchy): fix resultHeight calculation
This previously double incremented `resultHeight`. When writing this,
I was thinking the child node's height was 1 more than the call for its
dependencies. The parent node (the result) would then be more more than
that.

However, `resultHeight`'s definition is based the longest edge in the
dependencies array returned, which doesn't include the parent node. The
additional `+ 1` to account for the parent node should never have been
added.
2023-01-02 00:25:39 +02:00
Brandon Cheng
35fea5ea74 fix(dependencies-hierarchy): initialize resultHeight to null
In a debugger, I noticed a test package with no dependencies return a
height of `0` from getTree. By the comment in `DependencyInfo`, this
should instead be `null` since the dependencies array is empty.

It turns out this is the case when `deps == null`. The `getTree`
function early returns with a `null` height:

```ts
if (deps == null) {
  return { dependencies: [], isPartiallyVisited: false, height: null }
}
```

However, when `deps` is `{}`, `resultHeight` gets initialized to `0`.
The subsequent `.forEach` loop then iterates over the non-empty object.
2023-01-02 00:25:39 +02:00
Zoltan Kochan
ec97a31057 fix: print a better error message on prepare pkg failure (#5847)
ref #5845
2023-01-01 23:28:33 +02:00
Pascal Jufer
08ceaf3fcb chore(deps): replace is-ci by ci-info (#5862) 2023-01-01 20:53:07 +02:00
Zoltan Kochan
ee081825bf docs(license): update year 2023-01-01 04:26:13 +02:00
Zoltan Kochan
83ba90fb83 fix: better error message when the installed package was unpublished (#5854)
close #5849
2022-12-31 15:15:10 +02:00
Brandon Cheng
7eb7056c92 refactor(dependencies-hierarchy): simplify max depth recursion (#5858)
* test(dependencies-hierarchy): start currentDepth at 1 in tests

Calls to `getTree` from the `buildDependenciesHierarchy` function always
start the `currentDepth` at `1` rather than `0`.

Updating `currentDepth` calls in test to also start at `1` for
consistency with production code. This required incrementing the
`maxDepth` argument in a few cases as well.

* refactor(dependencies-hierarchy): simplify max depth recursion
2022-12-31 03:11:00 +02:00
Zoltan Kochan
00dea18c60 chore(deps): update 2022-12-30 22:05:59 +02:00
Brandon Cheng
7853a26e15 fix(dependencies-hierarchy): account for depth in getTree cache (#5817) 2022-12-29 22:21:04 +02:00
Zoltan Kochan
33f95fcc7f chore(release): 7.21.0 v7.21.0 2022-12-28 16:45:22 +02:00
Zoltan Kochan
d71dbf230b fix: only the add command should fail if there is no bin directory in PATH (#5842)
close #5841
2022-12-27 23:23:00 +02:00
Zoltan Kochan
83a627a25c fix(config): the --location=global CLI option should work (#5843)
ref #5841
2022-12-27 19:46:22 +02:00
await-ovo
b3dfa3ba8a feat(plugin-commands-script-runners): add --shell-mode option for pnpm dlx (#5840)
close #5679
2022-12-26 18:58:25 +02:00
Zoltan Kochan
964d5ff278 chore(release): 7.20.0 v7.20.0 2022-12-26 00:59:32 +02:00
汪東陽
3e4b8fa416 feat(pnpm): add show alias to pnpm view (#5835) 2022-12-26 00:58:15 +02:00
Weyert de Boer
1d3995fe33 feat: add description field to output to licenses command output (#5836)
Add the `description`-field to the output of the `licenses list`-command so that
for each package the description in the package manifest gets listed too
2022-12-25 23:59:53 +02:00
Zoltan Kochan
339c0a7046 fix: run prepublish scripts of packages installed from Git (#5837)
close #5826
2022-12-25 21:18:18 +02:00
Zoltan Kochan
0048e0e64e fix: hint how to change global store location 2022-12-25 12:59:47 +02:00
Brandon Cheng
084823fe3b test(dependencies-hierarchy): add low-level depth tests for getTree (#5828) 2022-12-24 17:21:45 +02:00
Zoltan Kochan
841f52e709 feat: implement the config commands (#5829)
close #5621
2022-12-24 17:08:43 +02:00
Zoltan Kochan
4700b095ec fix: pnpm env should print help 2022-12-23 16:09:55 +02:00
Brandon Cheng
29adcae059 refactor(dependencies-hierarchy): remove unused lockfileDir argument (#5824) 2022-12-23 15:01:32 +02:00
Zoltan Kochan
bbc3062a4e chore: fix security vulnerabilities in deps 2022-12-23 01:41:42 +02:00
Zoltan Kochan
5c75ff3ec6 fix: rebuild should print a better error message (#5819)
close #5815
2022-12-23 01:36:58 +02:00
Zoltan Kochan
d7ea8b486a chore(release): 7.19.0 v7.19.0 2022-12-21 12:55:30 +02:00
Zoltan Kochan
3360c9f4b0 perf: do not build the same dependency multiple times when node-linker is hoisted (#5814) 2022-12-21 12:29:59 +02:00
Zoltan Kochan
7030cc26e8 refactor: use Object.fromEntries instead of Ramda.fromPairs 2022-12-21 03:23:10 +02:00
Zoltan Kochan
c9d3970e33 fix: rebuild when node-linker is set to hoisted (#5811)
close #5560
2022-12-21 03:07:01 +02:00
NullVoxPopuli
e8aafe393c fix: patch should print instructions about how to commit the changes (#5809)
Co-authored-by: Zoltan Kochan <z@kochan.io>
2022-12-21 02:59:17 +02:00
await-ovo
b77651d14d feat: add pnpm.requiredScripts config (#5802)
close #5569

Co-authored-by: Zoltan Kochan <z@kochan.io>
2022-12-21 00:44:33 +02:00
Zoltan Kochan
2458741fab feat: store locations of deps when node-linker is set to hoisted (#5795)
Currently, when `node-linker=hoisted` is used and `node_modules` is not up-to-date, pnpm relinks all dependencies inside node_modules. This is not efficient, so with this optimisation pnpm will only relink what needs to be relinked.
2022-12-18 20:53:53 +02:00
Zoltan Kochan
bc18d33fe0 fix(deps): update @zkochan/cmd-shim 2022-12-14 02:39:56 +02:00
Zoltan Kochan
6b00a83256 fix: don't relink injected packages if they were not built (#5792) 2022-12-13 21:47:37 +02:00
Zoltan Kochan
90ec7fcf3f chore: release libs 2022-12-13 04:08:28 +02:00
Zoltan Kochan
313702d76b refactor: all packages should be in the @pnpm scope (#5785) 2022-12-13 03:46:56 +02:00
Zoltan Kochan
450e0b1d10 feat: add a new option to the hoister to ignore some deps (#5784) 2022-12-13 00:15:26 +02:00
Zoltan Kochan
234e9ebaec chore(release): 7.18.2 v7.18.2 2022-12-12 14:08:44 +02:00
chlorine
f5c377a8d0 fix: throw an error while missing script start or server.js (#5782) 2022-12-12 10:47:14 +00:00
await-ovo
2587011989 fix: print errors when --json option used (#5718) 2022-12-10 16:41:24 +02:00
Zoltan Kochan
73bb2a2ea3 ci: skip cache 2022-12-10 16:13:12 +02:00
Zoltan Kochan
aefb9f6f72 test: skip unreliable test on Windows 2022-12-10 16:12:29 +02:00
await-ovo
5d8f84520c fix(plugin-commands-publishing): output --json option in help info (#5773) 2022-12-09 22:21:47 +02:00
Weyert de Boer
5464e1da6e fix: improve license file reading logic (#5740)
* fix: improve license file reading logic

If the file index is of the appropriate type so we can leverage the contents of `PackageFileInfo`-type we try
to lookup the file mode to and pass it to the `readLicenseFileFromCafs`-function so it can be correctly
passed to the underlying `getFilePathByModeInCafs`-function responsible for fetching the file from
the PNPM store

* test: add integration test for the problematic `svgicons2svgfont`

Added a test to verify that the LICENSE files of the `svgicons2svgfont@5.0.2`-package
and similar packages can be read without errors

* refactor: license

* docs: add changesets

Co-authored-by: Weyert de Boer <weyert@innerfuse.biz>
Co-authored-by: Zoltan Kochan <z@kochan.io>
2022-12-09 22:02:16 +02:00
Zoltan Kochan
ef134a0055 refactor: license scanner 2022-12-09 21:41:32 +02:00
await-ovo
49f6c917fb fix: should not replace workspace:* when update (#5764)
close #5317
close #5303
close #5312
close #5726
2022-12-09 20:51:03 +02:00
Zoltan Kochan
28a99f43f9 chore(release): 7.18.1 v7.18.1 2022-12-06 11:41:39 +02:00
Zoltan Kochan
4947603888 fix(audit): don't skip vulnerabilities with no CVEs codes (#5756) 2022-12-06 11:37:42 +02:00
Zoltan Kochan
b11a8c363c fix: it should possible to use abolute file paths in overrides (#5757)
close #5754
2022-12-06 11:36:47 +02:00
Zoltan Kochan
3f644a514d fix(reporter): update notifier instructions (#5750)
ref #5747
2022-12-06 01:49:38 +02:00
Zoltan Kochan
568dc3ab21 fix(licenses): print help when no subcommand is specified (#5751)
close #5745
2022-12-05 12:13:56 +02:00