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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

API improvements to support RushJS integration #20

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

octogonz
Copy link
Member

These changes improve logging for microsoft/rushstack#4594.

  • To reduce confusion, rename storePath to dotPnpmFolder and avoid referring to it as the "store"
    馃憠 The PNPM "store" is a different folder from the "virtual store" (.pnpm folder), and PNPM itself is somewhat vague about whether the "virtual store" means the .pnpm folder or actually its subfolder paths

  • Fix a bug where postbuildInjectedCopy.sourceFolder and targetFolders were calculated with an extra .. because they were relative to pnpmSyncJsonPath which is a file, not a directory

  • pnpm-sync CLI now returns nonzero exit code for errors/warnings

  • Add --verbose CLI parameter for testing verbose events

  • Provide an importable name for ILogMessageCallbackOptions.details

  • Add API docs for IPnpmSyncCopyOptions and IPnpmSyncPrepareOptions

  • Rename COPY_PROCESSING to ``COPY_ERROR_NO_SYNC_FILE` to more clearly indicate that it is an error.

  • Introduce new log events PREPARE_ERROR_UNSUPPORTED_FORMAT and PREPARE_WRITING_FILE

  • Add more details fields to the various log events

  • The millisecond timings are now number instead of string to permit the caller to format them

  • Remove pnpm-sync: prefix from log messages so the caller can do that

  • Improve grammar to avoid a Synced 1 files message

  • IPnpmSyncCopyOptions.pnpmSyncJsonPath is no longer optional because API's should not be designed around process.cwd() and also a correct implementation needs to test existence of that file before calling the API

  • Remove IPnpmSyncCopyOptions parameter destructuring because this is an implementation detail that clutters the public API docs

@g-chao

@g-chao g-chao merged commit cd26365 into main Mar 26, 2024
2 checks passed
@g-chao g-chao deleted the octogonz/api-improvements branch March 26, 2024 16:49
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

Successfully merging this pull request may close these issues.

None yet

2 participants