Skip to content
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

TODO List: Initial integration of pacquet's frozen-lockfile to pnpm #149

Open
1 of 6 tasks
KSXGitHub opened this issue Oct 10, 2023 · 7 comments
Open
1 of 6 tasks

Comments

@KSXGitHub
Copy link
Contributor

KSXGitHub commented Oct 10, 2023

@zkochan
Copy link
Member

zkochan commented Oct 10, 2023

What will JSON API be used for?

@KSXGitHub
Copy link
Contributor Author

What will JSON API be used for?

pnpm will interact with pacquet via JSON stdout. On happy path, pnpm will periodically listen to JSON messages and output report to the terminal. On error path, an appropriate JSON message will be processed by pnpm to determine if it should fallback to Node.js or print an error message.

@zkochan
Copy link
Member

zkochan commented Oct 10, 2023

pnpm uses NDJSON to log data and it is used by the reporter to do pretty output for the users. So if pacquet will print the same logs, pnpm's renderer will work.

@KSXGitHub
Copy link
Contributor Author

@zkochan What about error reporting?

@zkochan
Copy link
Member

zkochan commented Oct 11, 2023

@KSXGitHub
Copy link
Contributor Author

Error is one of the log types

https://github.com/pnpm/logger/blob/37902c06048ec4df19f6ebc11b14d1263d9f1a17/src/logger.ts#L12

Does Error in this code refer to JavaScript Error object? JSON cannot construct JavaScript Error object. I expect pnpm to be able to parse precise error message.

For example: If pnpm receives the following JSON, it must fallback to TypeScript algorithm based on error.type

{ "error": { "type": "NotYetImplemented", "message": "monorepo is not yet implemented" } }

@zkochan
Copy link
Member

zkochan commented Oct 12, 2023

Let's not do any fallback stuff. This is experimental. If it fails, it is fine.

@KSXGitHub KSXGitHub self-assigned this Oct 23, 2023
@KSXGitHub KSXGitHub pinned this issue Oct 30, 2023
@KSXGitHub KSXGitHub removed their assignment Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants