Commit Graph
254 Commits
Author SHA1 Message Date
Zoltan Kochan 7678113d79 chore: use catalogs (#8249) 2024-06-27 17:22:38 +02:00
Zoltan Kochan 347c79a8cd chore(release): 9.4.0 2024-06-17 17:44:19 +02:00
Zoltan Kochan ed9c041f61 fix(deps): update 2024-06-11 11:27:03 +02:00
Zoltan Kochan d24d7974ac chore(release): 9.3.0 2024-06-10 13:58:41 +02:00
Zoltan Kochan 47341e5004 fix: make the peers suffix shorter (#8177)
ref #7079
2024-06-07 23:37:07 +02:00
Brandon Cheng c7e1b6fae8 chore: configure TypeScript project references for tests (#8128)
* refactor: store link values before converting to references

* fix: use .sort() without localeCompare

https://github.com/pnpm/pnpm/pull/8128#discussion_r1614031566

> Nit, but you probably just want to call sort without a comparison
> function; these are already strings and locale compare is not a good
> comparison for anything but human readable strings since it will
> differ on different people's machines based on their language setting.
> I've hit this too many times before for code gen.

* feat: configure meta-updater to write test/tsconfig.json files

* fix: relative imports for __typings__

* chore: `pnpm run meta-updater`

* fix: explicitly use test/tsconfig.json for ts-jest
2024-05-31 12:48:13 +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
Zoltan Kochan 355ccd1243 chore(release): libs 2024-05-21 14:46:39 +02:00
Zoltan Kochan c649954e41 refactor: create a separate type for DepPath (#8094) 2024-05-20 16:11:46 +02:00
Zoltan Kochan 45f4262f03 refactor: create a separate type for NodeId (#8092) 2024-05-17 11:23:52 +02:00
Zoltan Kochan 7e69321e53 chore(release): 9.1.0-0 2024-04-29 15:36:28 +02:00
Zoltan Kochan 9719a42d0e feat: configurable max length of directories inside node_modules/.pnpm (#7994)
close #7355
2024-04-28 11:07:29 +02:00
Zoltan Kochan 43bd75c5b8 chore(release): libs 2024-04-09 17:14:05 +02:00
Khải a5b0780eb8 refactor: return type for dependency-path (#7867)
I want to improve type checker performance as recommended by
https://github.com/microsoft/TypeScript/wiki/Performance#using-type-annotations

In order to prevent merge conflict, I will do it one module at a time
2024-04-08 18:07:45 +02:00
Zoltan Kochan 21878e7ae4 feat(lockfile)!: change the keys format (#7752) 2024-03-17 23:01:39 +01:00
Zoltan Kochan 53594a3787 feat!: package ID should be an exact version spec (#7748) 2024-03-10 14:46:25 +01:00
Zoltan Kochan 857c0547ac fix(deps): update 2024-02-12 22:46:58 +01:00
Zoltan Kochan 46d38a8744 fix: parsing dependency path 2024-02-09 02:27:34 +01:00
Zoltan Kochan 862c707610 fix: converting dep path to file name (#7632)
close #7631
2024-02-09 01:51:29 +01:00
Zoltan Kochan 98a126699c fix: resolve peer of peer from the deps of direct dependent package (#7606)
close #7444

Peer dependencies of peer dependencies are now resolved correctly. When peer dependencies have peer dependencies of their own, the peer dependencies are grouped with their own peer dependencies before being linked to their dependents.

For instance, if `card` has `react` in peer dependencies and `react` has `typescript` in its peer dependencies, then the same version of `react` may be linked from different places if there are multiple versions of `typescript`. For instance:

```
project1/package.json
{
  "dependencies": {
    "card": "1.0.0",
    "react": "16.8.0",
    "typescript": "7.0.0"
  }
}
project2/package.json
{
  "dependencies": {
    "card": "1.0.0",
    "react": "16.8.0",
    "typescript": "8.0.0"
  }
}
node_modules
  .pnpm
    card@1.0.0(react@16.8.0(typescript@7.0.0))
      node_modules
        card
        react --> ../../react@16.8.0(typescript@7.0.0)/node_modules/react
    react@16.8.0(typescript@7.0.0)
      node_modules
        react
        typescript --> ../../typescript@7.0.0/node_modules/typescript
    typescript@7.0.0
      node_modules
        typescript
    card@1.0.0(react@16.8.0(typescript@8.0.0))
      node_modules
        card
        react --> ../../react@16.8.0(typescript@8.0.0)/node_modules/react
    react@16.8.0(typescript@8.0.0)
      node_modules
        react
        typescript --> ../../typescript@8.0.0/node_modules/typescript
    typescript@8.0.0
      node_modules
        typescript
```

In the above example, both projects have `card` in dependencies but the projects use different versions of `typescript`. Hence, even though the same version of `card` is used, `card` in `project1` will reference `react` from a directory where it is placed with `typescript@7.0.0` (because it resolves `typescript` from the dependencies of `project1`), while `card` in `project2` will reference `react` with `typescript@8.0.0`.
2024-02-09 00:50:08 +01:00
Zoltan Kochan 89b396b4c6 refactor!: createPeersFolderSuffix renamed to createPeersDirSuffix 2024-02-08 00:52:21 +01:00
Zoltan Kochan 6e3b75a42f chore(release): 9.0.0-alpha.0 2024-01-08 19:12:45 +01:00
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
Zoltan Kochan 43cdd87c0c feat!: drop Node.js 16 support 2024-01-08 11:57:44 +01:00
Zoltan Kochan 568860daae chore(release): 8.13.1 2023-12-26 15:39:22 +01:00
Zoltan Kochan 74e8f474f3 chore(release): libs 2023-12-14 16:15:57 +01:00
Zoltan Kochan b90029432d chore(release): 8.10.0-0 2023-10-24 15:54:22 +03:00
Zoltan Kochan 95ffe6f639 test: check spelling in markdown files 2023-10-20 18:38:01 +03:00
Zoltan Kochan 01bc58e2c4 fix(deps): update 2023-10-15 13:08:09 +03:00
Zoltan Kochan 3ad2ec63eb chore(release): libs 2023-10-08 17:21:51 +03:00
LaicZhang 41b5eb7a5b perf: replace startsWith with === (#7138) 2023-09-27 16:32:05 +03:00
Zoltan Kochan 98377afd34 chore(deps): update 2023-09-19 15:24: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.

https://github.com/typescript-eslint/typescript-eslint/commit/c13ce0b4f7a74a6d8fecf78d25ebd8181f7a9119#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 a35ec3fd92 chore(release): 8.6.8 2023-07-17 12:19:50 +03:00
Zoltan Kochan 75673055f4 chore(deps): update 2023-07-13 18:40:03 +03:00
Zoltan Kochan 3c2c426d13 chore(deps): update 2023-06-23 01:29:50 +03:00
Zoltan Kochan 1989a068b3 chore(deps): update 2023-06-03 22:41:42 +03:00
Zoltan Kochan f0817fa165 chore(release): 8.6.0 2023-05-28 14:59:16 +03:00
Zoltan Kochan c7235c0581 chore(deps): update 2023-04-25 03:14:06 +03:00
Zoltan Kochan dadef0e950 chore(release): 8.3.0 2023-04-18 03:03:07 +03:00
Jake Bailey c0760128d6 perf: bump semver to 7.4.0 (#6377) 2023-04-11 12:03:55 +03:00
Zoltan Kochan 61b7919ad4 chore(release): 8.1.1 2023-04-04 02:40:53 +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 5087636b66 fix: installation of packages with () in scope name (#6349)
close #6348
2023-04-04 00:18:43 +03:00
Zoltan Kochan eb5b7d5299 chore(release): 8.0.0-rc.0 2023-03-24 15:52:20 +02:00
Zoltan Kochan 0e26acb0fb refactor: dependency-path 2023-03-24 15:25:53 +02:00
Zoltan Kochan eceaa8b8b7 feat!: drop Node.js 14 support 2023-03-18 17:11:38 +02:00
Zoltan Kochan ee61ca4cb7 style: update eslint (#6236) 2023-03-18 14:57:29 +02:00
Zoltan Kochan a4ce8e1f27 Merge branch 'main' into v8 2023-02-23 13:13:30 +02:00