-
Notifications
You must be signed in to change notification settings - Fork 885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package manager CI action #1113
Conversation
A third option would be to fall back to
I haven't tested but it should work, the
That PR is mostly blocked by Node, they unflagged ESM before the loader API was ready |
I like
a lot. I'd prefer not to add that additional dependency, but I'm also ok to add it if it's the only option. |
Adding it wouldn't help much, you can read the file by using the |
echo "nodeLinker: pnp" >> .yarnrc.yml | ||
echo "pnpMode: loose" >> .yarnrc.yml | ||
yarn install | ||
yarn add --dev transport@link:./test/fixtures/transport |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant you should do this regardless of what is running and get rid of the manual symlinking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doing the same with npm across multiple node version is not that easy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With npm you can use the file:
protocol which has been supported since 2.0.0
https://docs.npmjs.com/cli/v7/configuring-npm/package-json#local-paths
Quick update:
|
I'm ok in landing this without typescript support if it's feasible. |
# see https://github.com/yarnpkg/berry/issues/2935#issuecomment-911299992 | ||
yarn add --dev typescript@~4.3.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# see https://github.com/yarnpkg/berry/issues/2935#issuecomment-911299992 | |
yarn add --dev typescript@~4.3.2 |
We've released the fix for this issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
To avoid this issue for future typescripts minor releases, where could we read the last working version integrated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have it documented anywhere, we try to update the patch as soon as they make a new release. Also TypeScript doesn't follow semver so their minor
is actually a major
release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeScript doesn't follow semver so their minor is actually a major release
For this reason, the pino's maintainer may evaluate to pin the dep to ~4.4.0
so it will be dependabot to update it and trigger the new error for new minor changes
dependencies: | ||
tap-yaml: "*" | ||
' >> .yarnrc.yml | ||
yarn add --dev typescript@~4.3.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn add --dev typescript@~4.3.2 |
PR ready Updated first post accordingly. for this issue
I had to disable the coverage since this test was starving. What I found is that:
I did not investigate further Lines 372 to 382 in f712a52
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be too much to run this for every PR, those are a lot of tests. Maybe could we just run them.
As an example, we run this only on master
: https://github.com/fastify/fastify/blob/main/.github/workflows/package-manager-ci.yml#L3-L6
I would also run this only on Node.js v14.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fix #1107
A run of this action here: https://github.com/Eomm/pino/actions/runs/1190604660
This PR requires a todo list to recap its status:
pnpm
no issues ✅flaky test on win and node 16: disabled coverage to let it worksyarn
yarn@2
at this time, it triggers an error when thetypescript
module is higher than4.3.2
. Asking to reopen this issue [Bug] Cannot install typescript 4.3.2 with yarn 2 / node_modules linker yarnpkg/berry#2935 . A temporary solution is to stick the TS module version.yarn@3 / PnP
must skip the test that create at runtime anode_module/transport
package. This happens because the module does not exist during the installation phase and it is not packaged. Not sure it is a valid check. Asked help hereyarn@3 / PnP
does not works withingpino-elasticsearch
. This must be supported to be PnP compatible.deep down on
yarn@3 / PnP
The
pino-elasticsearch
issue is caused by the yarn'srequire.resolve()
resolution that produces a string like this[...]cache/pino-elasticsearch-npm-6.1.0-0c03079478-6915435172.zip/node [...]
(note the zip file).This string is provided as
fileName
parameter to thethread-stream
module:https://github.com/pinojs/thread-stream/blob/main/lib/worker.js#L18
that throws the error:
Yarn supports this zip path out of the box (monkey patching it) but it does not support the
import
ESM loader.Reference: yarnpkg/berry#638 and there is a draft PR to support it yarnpkg/berry#2161
So, to solve the PnP support issue, I see two main paths:
thread-stream
module to supportyarn
zip path using the@yarnpkg/fslib
module.