chore: migrate vscode-logging - #583
Conversation
Copy the logger, types and wrapper packages from SAP/vscode-logging@master into projects/vscode-logging/packages/ as the first (move-only) step of the monorepo consolidation. No source modifications yet; lint/format/compile fixes follow in subsequent commits. Per-package CONTRIBUTING.md dropped (root CONTRIBUTING.md covers the monorepo). The source repo's root package.json is intentionally NOT copied: app-studio- toolkit's top root already owns release/husky/commitlint/prettier, and pnpm's projects/* workspace glob would otherwise treat it as a live member. Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
Wire the copied vscode-logging packages into app-studio-toolkit's tooling: - .eslintrc.js: relax rules for projects/vscode-logging/** (eslint-comments/ require-description, no-unused-vars) and projects/vscode-logging/**/*.ts (no-explicit-any, no-unused-expressions, no-unused-vars, no-unsafe-argument), mirroring the yeoman-ui / vscode-mta-tools integration blocks. - tsconfig.json (logger, types, wrapper): add skipLibCheck (AST convention) to resolve @types/node vs DOM-lib clashes under the repo's TypeScript 5.7.3. - logger: add a local nyc.config.js (include lib/**/*.js, excludeAfterRemap: false) so coverage is measured against lib/ instead of the root nyc.config.js '**/src/**' pattern; removes the previously ignored package.json 'nyc' block. - package.json (logger, types, wrapper): repoint repository/bugs metadata from SAP/vscode-logging to SAP/app-studio-toolkit with the project directory. - CHANGELOG.md: preserve the pre-migration history with a historic-note header; future changes are tracked in the per-package changelogs. Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
Apply app-studio-toolkit's prettier (2.4.1) to the migrated sources. This is a formatting-only commit (isolated from the logic changes) and also normalises the source line endings from CRLF to LF. Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
- scripts/merge-coverage.js: also collect projects/*/packages/*/.nyc_output so nested-project coverage (vscode-logging, yeoman-ui, vscode-mta-tools) is included in the merged report; derive the merged file name from the package path to avoid collisions between same-named packages across projects. - .gitignore: ignore logger's test/.log-out output directory. Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
Bring in the extension, extension-wrapper and library example packages. Adds a projects/*/examples/* lookup pattern to pnpm-workspace.yaml and the root package.json workspaces so nested example packages are picked up by the workspace (formatting normalised in the following commit). Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
…version
vscode-mta-tools pinned @vscode-logging/logger@1.2.3. Once logger@2.0.9 is a
package in this workspace, that stale range makes Changesets' dependents-graph
check fail ('must depend on the current version'), which would break the
release flow.
Bump it to 2.0.9 to match the current version, consistent with how every other
cross-project consumer in this repo pins @vscode-logging packages (e.g.
yeoman-ui/backend -> logger 2.0.9; the app-studio-toolkit packages -> wrapper
2.0.9 / types 2.0.8). vscode-mta-tools' own ci (compile + 110 tests at 100%
coverage + webpack bundle + vsix package) passes against logger 2.0.9.
Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
logger's .mocharc.js does require('chai-exclude'), but that package was only
declared in the source repo's root package.json (not migrated). A clean CI
install therefore fails with 'Cannot find module chai-exclude'. It passed
locally only because an earlier install had left it in node_modules.
Declare chai-exclude (2.1.0, the source repo's version) in logger's own
devDependencies. Verified green from a pristine checkout via
'CI=true pnpm install --frozen-lockfile && CI=true pnpm run ci'.
Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
Build ReportPlease note:
|
The root .gitignore already covers node_modules and *.vsix, and the examples do not produce a vsix, so the per-example .gitignore files were pure duplication. Addresses review feedback on PR #583. Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
…ages extension-wrapper (example) and the wrapper package now extend the root tsconfig.base.json and drop the duplicated compilerOptions, matching the repo convention (yeoman-ui / app-studio-toolkit packages). logger and types stay self-contained: they are type-check-only/checkJs and base's strict + composite options break them. Addresses review feedback on PR #583. Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
Per review (bd82): intra-monorepo dependencies should use the workspace:* protocol, not an exact version pin, so they resolve to the in-repo package and stay consistent as versions change. Switch vscode-mta-tools' @vscode-logging/ logger dependency from 2.0.9 to workspace:*. Still clears the Changesets dependents-graph check; verified mta-tools builds/tests/bundles against the in-repo logger. Broader workspace:* conversion of other consumers to follow in a separate PR. Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
Per review (Corentin + Shachar): use the CHANGELOG.old.md naming for the pre-migration history, matching the vscode-mta-tools pattern. Nothing references the file by name; the historic-note header is retained. Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
….json Per review (Corentin): add a note key stating why @types/vscode is pinned per package to the minimum supported VS Code API version instead of the monorepo root version. Applied to the logger and wrapper packages and the two extension examples. Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
|
I think there is value to transfer (most of) the old root For example: https://github.com/SAP/app-studio-toolkit/tree/main/projects/vscode-mta-tools |
bd82
left a comment
There was a problem hiding this comment.
See inline comments.
I also think the changesets config should be modified to lock the new packages as a single release, so if one is bumped all are bumped.
See: https://github.com/SAP/app-studio-toolkit/blob/main/.changeset/config.json#L8-L13
The reason is because the previous vscode-logging lerna.json was set to the default"fixed/locked" and this would be the most similar flow with changeSets.
In theory unlocked can result in strange edge cases like multiple versions of the same package existing at the same time at runtime.
I'm not sure if the examples should be part of this lock.
- Their version means little, they are not published.
- Would locking them create more github tags spam when one of the three productive packages are released
…gging Per review (bd82): skipLibCheck is too heavy-handed; the real cause of the @types/node-vs-DOM clashes was the outdated root @types/node. Bump it to 22 (oldest still-supported Node) and remove skipLibCheck from the logger, types and wrapper tsconfigs (also drop a redundant target in types, ineffective under noEmit). The v22 typings change NodeJS.setInterval's return type, so annotate the two timers in app-studio-toolkit's landscape.ts as NodeJS.Timeout. Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
Per review (bd82): the source vscode-logging used lerna fixed/locked mode (all packages version together). Mirror that with a fixed group in the Changesets config so logger, types and wrapper always bump as one, avoiding multiple versions of sibling packages at runtime. Examples are excluded (unpublished; locking them would only add release-tag noise). Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
…mple changelogs Per review (bd82): Changesets generates a fresh per-package CHANGELOG.md on release and mixing it with the old conventional-commits changelog breaks it (same reason the project-level file was renamed). Rename logger/types/wrapper CHANGELOG.md to CHANGELOG.old.md and add both to each package's files array so they ship in the npm artifact. Delete the example changelogs (unpublished, they only confuse Changesets). Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
Per review (bd82): standardize every workspace dependency (packages and examples) to workspace:* instead of workspace:^, matching the locked shared release lifecycle of the three productive packages. Avoids the edge case of workspace:^ being copied into a productive package and resolving to an unexpected version. Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
Per review (bd82): point issue and CONTRIBUTING links at SAP/app-studio-toolkit (the old ones pointed at the standalone repo or a CONTRIBUTING.md that no longer travels with the package), and remove the hand-written License/copyright section since scripts/legal-copy.js injects licensing at build time (it was duplication). Mirrors the vscode-mta-tools README. Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
Per review (bd82): keep a project-level README explaining what vscode-logging is and listing its packages, so the projects/<name> hierarchy is self-describing (mirrors projects/vscode-mta-tools). Adapted from the old standalone repo root README, with links pointing at the monorepo. Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
|
thanks for the thorough review @bd82, really helpful. i pushed 6 commits addressing everything:
deferred as you suggested: the per-file eslint-disable on api.d.ts (later eslint pass). the @types/vscode centralization and coverage-gate questions i left as no-action, food for thought for later. full ci is green and the branch is up to date with main. i left your threads open so you can verify. ready for another look when you have time. |
Follow-up to the README cleanup: the trailing 'This file is licensed ...' line had a dead link (../../LICENSE resolves to a non-existent projects/vscode-logging/ LICENSE) and is the same manual license duplication legal-copy.js already handles. Removing it from logger, types and wrapper, consistent with the vscode-mta-tools and yeoman-ui READMEs which do not carry it. Signed-off-by: Jacob Kreyenbuehl <jacob.kreyenbuehl@sap.com>
What
Consolidates the SAP/vscode-logging project (@vscode-logging/logger, /types, /wrapper + example packages) into app-studio-toolkit under projects/vscode-logging/, following the yeoman-ui (#503) and vscode-mta-tools (#547) precedents.
Why
Part of folding the separate BAS open-source repos into this monorepo: one CI, one security/Renovate setup, one Changesets release pipeline, less abandoned-repo drift.
Behaviour
Commits are staged move → format → fixes → examples for review; squash on merge.