Commit Graph

72 Commits

Author SHA1 Message Date
Zoltan Kochan
5da5e75e08 chore(release): 9.12.0 2024-10-02 12:19:20 +02:00
Khải
f071d00815 refactor: replace forEach with for-loops (#8535)
* refactor: replace `forEach` with `for`-loops

Changes:
* Most `Object.keys(o).forEach` are replaced by `for in`.
* Most `Array.filter(c).forEach` are replaced by `for of` + `if continue`.
* `return` in `forEach` callbacks are replaced by `continue`.

There may be minor improvement to memory footprint as this change would
reduce the creations of temporary arrays and temporary functions.

* fix: return -> continue

* refactor: remove the commented out code
2024-09-18 03:58:25 +02:00
Zoltan Kochan
fe996fee1d chore(release): 9.10.0 2024-09-09 15:43:02 +02:00
Zoltan Kochan
10d8007747 chore(release): 9.9.0 2024-08-26 17:12:28 +02:00
Khải
9b4f73caaf chore(scripts): typecheck-only (#8395)
* chore(scripts): typecheck-only

* feat: change all configuration

* feat: include pnpm/ and pnpm/test/

* chore(deps): remove unused dependency

* refactor(typescript-only): use find-packages

* refactor(typescript-only): refactor paths

* fix: typescript-only

* fix: update compile-only

* fix: compile pnpm

* fix: windows

* fix: windows

* chore: meta-updater

* refactor(tsconfig): remove explicit composite

* fix: path in windows

* feat: don't depend on cwd

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-08-11 08:26:01 +02:00
Zoltan Kochan
97c95cca48 chore: update typescript to v5.5 (#8364)
* chore: update typescript to v5.5

* fix: some errors

* chore(deps): update @pnpm/logger

* chore(deps): use catalogs

* refactor: remove a type no longer necessary

* chore(deps): revert the catalog changes

This reverts commit 5a3d4394f1.

* refactor: move types to their own files

* refactor: change logger error type

* feat: add pkgsStack to LogBase

* feat: add type param to StreamParser

* refactor: move error fields out for clarity

* style: fix eslint

* feat: nullify non existence fields

* feat: add hint

* feat: remove the nullifications

This reverts commit 955e196032.

* feat: add `package` field

* feat: extend `RequestRetryMessage.error`

* fix: missing `id` field

* fix: statsLogger

* fix: correct types

* fix: pkgsDiff

* refactor: use interfaces

* fix: reportSummary

* fix: revert erroneous change

This reverts commit 81042a0783.

* fix: audit

* fix: silentReporter

* fix: reporter

* fix: eslint

* fix: main.ts

* fix: errorHandler

* refactor: share code

* fix: test/reportingPeerDependencyIssues

* fix: default-reporter/test/index.ts

* fix: test/reportingErrors.ts

* fix: test/execPnpm

---------

Co-authored-by: khai96_ <hvksmr1996@gmail.com>
2024-08-09 19:18:32 +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
87439cdf35 chore(release): libs 2024-08-05 13:45:55 +02:00
Zoltan Kochan
3b82169faf chore(release): 9.6.0 2024-07-22 01:41:03 +02:00
Zoltan Kochan
a3d5f609d0 chore(release): 9.5.0-beta.1 2024-07-04 15:54:08 +02:00
Zoltan Kochan
1865472bde chore: use catalogs 2024-06-27 22:06:05 +02:00
Zoltan Kochan
79830ff0b9 chore: use catalogs 2024-06-27 21:18:27 +02:00
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
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
c8655b465e chore(release): libs 2024-05-12 01:57:58 +02:00
Zoltan Kochan
7b8701cb62 fix: update deps (#7913) 2024-04-13 10:40:50 +02:00
Khải
757ae8200d refactor(modules-mounter+network): return types (#7894) 2024-04-11 00:59:59 +02:00
Zoltan Kochan
43bd75c5b8 chore(release): libs 2024-04-09 17:14:05 +02:00
Zoltan Kochan
442d97daad refactor: error handling in fetch 2024-03-28 17:59:10 +01:00
Nacho Aldama
7733f3a943 feat: support scoped client certificates (#7626)
close #7427

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-02-14 12:11:12 +01:00
Zoltan Kochan
ecda06d7b5 Merge branch 'v8' 2024-01-10 16:04:26 +01:00
Zoltan Kochan
388e1cc1cb chore(release): 8.14.1 2024-01-10 15:57:53 +01:00
Zoltan Kochan
6e3b75a42f chore(release): 9.0.0-alpha.0 2024-01-08 19:12:45 +01:00
Zoltan Kochan
43cdd87c0c feat!: drop Node.js 16 support 2024-01-08 11:57:44 +01:00
Nacho Aldama
5a5e42551e feat: allow using token helpers in pnpm publish (#7443)
Close #7316

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-01-08 01:24:57 +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
8a86facc06 chore(release): libs 2023-12-05 19:44:18 +01:00
Khải
3ac0487b3f feat(network): basic auth header (#7376)
close #7371

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-12-05 18:59:50 +01:00
Zoltan Kochan
058edcff85 chore(release): 8.11.0 2023-11-24 17:27:18 +01:00
Nacho Aldama
23039a6d60 fix: missing auth token in registries with paths included (#7337)
close #5970
close #2933

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-11-21 23:03:11 +02:00
Zoltan Kochan
b90029432d chore(release): 8.10.0-0 2023-10-24 15:54:22 +03:00
Zoltan Kochan
733d612ad1 test: check spelling with cspell (#7229) 2023-10-20 15:58:27 +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
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
3dfaf33c98 chore(release): libs 2023-07-30 14:32:08 +03:00
Zoltan Kochan
d4ad189e3b chore(deps): update 2023-07-29 22:32:10 +03:00
Frederick Engelhardt
3c5aaaf84e test: add tests specifically for removePort function includes http|https|wss|ws (#6874)
* * chore(tests): add tests specifically for removePort function
* chore(test): move removePort to it's own helper function
* add support for more url types, http,https,ws,wss

* chore(formatting): remove auto-formatting

* chore(formatting): remove auto-formatting for test file

* style: reformat

---------

Co-authored-by: Frederick Engelhardt <frederick.engelhardt@bestbuy.com>
Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-07-29 01:14:18 +03:00
Frederick Engelhardt
aa20818a0e feat(always-auth): add https port parsing on registry matching for artifactory compatibility (#6864)
Co-authored-by: Frederick Engelhardt <frederick.engelhardt@bestbuy.com>
Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-07-27 17:18:29 +03:00
Zoltan Kochan
a35ec3fd92 chore(release): 8.6.8 2023-07-17 12:19:50 +03:00
Zoltan Kochan
8920dbce38 chore(release): 8.6.5 2023-06-26 12:36:31 +03:00
Zoltan Kochan
e44031e71c fix: improve the performance of searching for auth tokens (#6717) 2023-06-26 12:35:40 +03:00
Zoltan Kochan
725c0d5adb chore(release): 8.6.4 2023-06-26 00:53:31 +03:00
Zoltan Kochan
4e7afec90c fix: searching for auth token for URL with port (#6708)
close #6354
2023-06-23 12:30:04 +03:00
Zoltan Kochan
43151bbd6e chore(release): 8.6.2 2023-06-11 21:35:42 +03:00
Zoltan Kochan
4b97f1f07a perf: don't use await inside loops (#6617) 2023-06-05 12:12:47 +03:00