Commit Graph

39 Commits

Author SHA1 Message Date
Zoltan Kochan
cdd83654dd feat!: don't include registry URL in package ID (#7476) 2024-01-08 11:57:44 +01:00
Zoltan Kochan
d381a6001c feat!: use dependency path format from lockfile v6 (#7470)
Drop lockfile v5 support.
2024-01-08 11:57:44 +01:00
LaicZhang
41b5eb7a5b perf: replace startsWith with === (#7138) 2023-09-27 16:32:05 +03:00
Brandon Cheng
e9aa6f682a chore(deps): update TypeScript 5.1.6 -> 5.2.2 (#7016)
* test: use sha512 integrity in fixtures to fix ci break

* test: update snapshots for sha512 fixture change

* chore(deps): remove unneeded peer dependency exception

The `peerDependencyRules.allowedVersions` exception on
`@typescript-eslint/eslint-plugin` no longer seems to be necessary.
Removing it does not introduce any new peer dependency errors on
`pnpm install`.

I suspect this was needed for the
`eslint-config-standard-with-typescript` dependency in the past, but a
@typescript-eslint/eslint-plugin upgrade made it no longer necessary.

* chore(deps): update @typescript-eslint dependencies 5.62.0 -> 6.5.0

@typescript-eslint 6.5.0 is the first version to introduce support for
TypeScript 5.2.

https://github.com/typescript-eslint/typescript-eslint/releases/tag/v6.5.0

```
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.2.0

YOUR TYPESCRIPT VERSION: 5.2.2

Please only submit bug reports when using the officially supported version.
```

* chore(deps): update eslint-config-standard-with-typescript 37.0.0 -> 39.0.0

Version 38.0.0 is the first version to support @typescript-eslint v6.
https://github.com/standard/eslint-config-standard-with-typescript/releases/tag/v38.0.0

Otherwise the following error appears.

```
> eslint "src/**/*.ts" "test/**/*.ts" "--fix"

Oops! Something went wrong! :(

ESLint: 8.47.0

Error: ../../.eslintrc.json » @pnpm/eslint-config » eslint-config-standard-with-typescript:
        Configuration for rule "@typescript-eslint/restrict-plus-operands" is invalid:
        Value {"checkCompoundAssignments":true} should NOT have additional properties.

    at ConfigValidator.validateRuleOptions (/Users/gluxon/Developer/pnpm/node_modules/.pnpm/@eslint+eslintrc@2.1.2/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2039:23)
    at /Users/gluxon/Developer/pnpm/node_modules/.pnpm/@eslint+eslintrc@2.1.2/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2094:18
```

* chore: remove unnecessary disables for restrict-template-expressions

The `@typescript-eslint/restrict-template-expressions` rule relaxed
what types are allowed in template expressions.

c13ce0b4f7 (diff-b852e1e199d2976eee1183fc84ac12a5d42fc61f0ae4b1c290dd54d621546db0)

Many of these disables were for interpolated values that had an `any`
type.

* chore: remove unnecessary disables for restrict-plus-operands

The original error was:

```
Invalid operand for a '+' operation. Operands must each be a number or string. Got `any`. eslint@typescript-eslint/restrict-plus-operands
```

It look like the newer version now allows `any`.

* style: fix errors of prefer-optional-chain and prefer-nullish-coalescing

The `@typescript-eslint/prefer-optional-chain` and
`@typescript-eslint/prefer-nullish-coalescing` rules got a bit
smarter. This commit applies autofixes. I believe the changes should be
equivalent to what existed before.

Example of the new `@typescript-eslint/prefer-optional-chain` lints.

```
pnpm/pkg-manifest/exportable-manifest/src/index.ts
  71:10  error  Prefer using an optional chain expression instead, as it's more concise and easier to read  @typescript-eslint/prefer-optional-chain
  87:10  error  Prefer using an optional chain expression instead, as it's more concise and easier to read  @typescript-eslint/prefer-optional-chain
```

Example of the new `@typescript-eslint/prefer-nullish-coalescing` lints.

```
pnpm/fs/find-packages/src/index.ts
  32:38  error  Prefer using nullish coalescing operator (`??`) instead of a ternary expression, as it is simpler to read  @typescript-eslint/prefer-nullish-coalescing
```

* chore(deps): update TypeScript 5.1.6 -> 5.2.2

* chore(deps): update @yarnpkg/core->@types/lodash override to 4.14.197

This fixes a compilation error that appears on TypeScript 5.2.2. This
error was fixed in a later version of `@types/lodash`.

https://github.com/DefinitelyTyped/DefinitelyTyped/pull/66123

```
../node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/index.d.ts:45:15 - error TS2428: All declarations of 'WeakMap' must have identical type parameters.

45     interface WeakMap<K extends object, V> { }
                 ~~~~~~~

Found 4 errors.
```
2023-08-31 16:27:01 +03:00
Zoltan Kochan
94f94eed63 fix: installing local dep from directory that starts with @ (#6350)
close #6332
2023-04-04 02:36:30 +03:00
Zoltan Kochan
0e26acb0fb refactor: dependency-path 2023-03-24 15:25:53 +02:00
Zoltan Kochan
ee61ca4cb7 style: update eslint (#6236) 2023-03-18 14:57:29 +02:00
Zoltan Kochan
ca8f51e60b feat: change the way directory names are shortened inside .pnpm 2023-02-10 16:30:00 +02:00
Zoltan Kochan
47e45d717d feat!: breaking config changes in v8 (#6035)
* auto-install-peers=true
* save-workspace-protocol=rolling
* publishConfig.linkDirectory true by default
* resolve-peers-from-workspace-root is true by default
* set dedupeDirectDeps to true by default in @pnpm/core.
2023-02-05 11:43:22 +02:00
Zoltan Kochan
9247f6781b fix: issues with storybook and the new lockfile format (#5998)
close #5976
2023-01-30 17:28:20 +02:00
Zoltan Kochan
0f6e95872a fix: lockfile v6 should not be corrupted on repeat install (#5905)
* fix: lockfile v6 should not be corrupted on repeat install

* fix: don't add empty specifiers to lockfile v6

* fix: lockfile v6 should be saved to node_modules/.pnpm/lock.yaml

* fix: frozen lockfile with lockfile v6
2023-01-10 11:41:17 +02:00
Zoltan Kochan
3ebce5db7a feat!: lockfile format v6 (#5810) 2023-01-09 14:37:05 +02:00
Zoltan Kochan
e379ec8a77 refactor: use more utils from ramda (#5656) 2022-11-19 04:29:21 +02:00
Zoltan Kochan
86bd1b171e fix(deps): update 2022-10-04 15:03:31 +03:00
Zoltan Kochan
fc581d371d fix: don't fail when the patched pkg appears multiple times (#4945)
Don't fail when the patched package appears multiple times in the dependency graph

close #4938
2022-06-28 02:23:48 +03:00
Zoltan Kochan
c635f9fc1a feat(patch): update patched dependencies on install (#4905) 2022-06-22 14:18:25 +03:00
Zoltan Kochan
725636a907 fix: create @pnpm/crypto.base32-hash 2022-06-18 22:58:16 +03:00
Zoltan Kochan
c576955506 fix: sanitize dir names in the store (#4726)
close #4716
2022-05-13 13:28:22 +03:00
Zoltan Kochan
0a70aedb1c feat: use a shorter hash for dep path (#4552) 2022-04-13 12:05:07 +03:00
CommanderRoot
bc35dff9a9 chore: replace deprecated String.prototype.substr() (#4479)
Co-authored-by: Zoltan Kochan <z@kochan.io>
2022-03-25 23:04:20 +02:00
Zoltan Kochan
faf830b8f6 feat: improve dep path of local deps 2022-03-19 20:39:10 +02:00
Zoltan Kochan
6c418943c3 fix: don't break the lockfile if it has peer deps with underscores (#3546)
close #3542
2021-06-20 02:40:33 +03:00
Zoltan Kochan
20e2f235da fix: installing two packages with same name in different case (#3417) 2021-05-03 23:30:36 +03:00
Zoltan Kochan
9ceab68f06 fix: use + instead of # in package paths inside node_modules/.pnpm (#3314) 2021-04-07 01:07:13 +03:00
Zoltan Kochan
e4efddbd22 fix: don't use colon in path to dependency 2021-02-20 02:06:55 +02:00
Zoltan Kochan
d6d091f249 style: use es2015 imports (#3143) 2021-02-15 05:06:10 +02:00
Zoltan Kochan
f2bb5cbeba feat: reduce directory nesting in virtual store directory (#3117)
ref #3115
2021-02-04 02:18:09 +02:00
Zoltan Kochan
e27dcf0dcc refactor(dependency-path): add depPathToFilename() 2020-12-30 12:12:08 +02:00
Zoltan Kochan
acc1782c6f style: restrict template expressions 2020-08-27 00:57:58 +03:00
Zoltan Kochan
1c8a02e996 style: use eslint instead of tslint
PR #2796
close #2300
2020-08-24 02:01:25 +03:00
Zoltan Kochan
41d92948b1 fix: installing tarballs from registry origin via non-standard URLs
close #2549
PR #2620
2020-06-09 10:55:02 +03:00
Zoltan Kochan
c75a921e36 style: no trailing commas in functions 2020-05-12 19:00:16 +03:00
Zoltan Kochan
bb5d41f337 style: add missing trailing commas and fix the linting rule 2020-01-01 19:18:25 +02:00
ExE Boss
4b56b860bc feat(dependency‑path): Expose peersSuffix
PR #2032

Co-Authored-By: Zoltan Kochan <zoltan.kochan@gmail.com>
2019-09-24 22:59:11 +03:00
Zoltan Kochan
c8d98856fa refactor: use includes() instead of indexOf() when possible 2019-04-07 13:08:26 +03:00
Zoltan Kochan
d0818d8b0a feat: shrinkwrap.yaml is registry-agnostic
PR #1613

* feat: shrinkwrap.yaml is registry-agnostic

BREAKING CHANGE:

The shrinkwrap.yaml file contains no info about the registry URL

close #1353

* feat(shrinkwrap): don't set id for packages from npm registries

* feat: bump shrinkwrap file version to 5

BREAKING CHANGE: shrinkwrap file version is 5

* fix: don't use ! in dependency paths inside node_modules

close #1601

* fix: installing package from scope with non-scoped deps

* feat(shrinkwrap): use underscore in dep path with peers
2019-01-22 20:26:06 +02:00
Zoltan Kochan
6ad444c217 style: remove unnecessary semicolons 2018-12-03 02:50:43 +02:00
Zoltan Kochan
94933ace4d fix: tarball local package from project directory 2018-11-24 02:25:32 +02:00
Zoltan Kochan
34b17faf95 refactor: add dependency-path to repo 2018-11-19 03:01:07 +02:00