Skip to content

chore: migrate vscode-logging - #583

Merged
jacob-kreyenbuehl merged 21 commits into
mainfrom
migrate/vscode-logging
Aug 26, 2026
Merged

chore: migrate vscode-logging#583
jacob-kreyenbuehl merged 21 commits into
mainfrom
migrate/vscode-logging

Conversation

@jacob-kreyenbuehl

@jacob-kreyenbuehl jacob-kreyenbuehl commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

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

  • Packages at projects/vscode-logging/packages/, examples at projects/vscode-logging/examples/; pnpm-workspace.yaml + root package.json gain a projects//examples/ lookup. Examples are private (not published).
  • Aligned to the monorepo toolchain (TypeScript 5.7.3, root prettier/eslint/husky/Changesets); the source repo's Lerna/husky/commitlint/prettier root config is dropped. A project-level README is kept.
  • Emitting packages extend the root tsconfig.base.json. Instead of skipLibCheck, the root @types/node is bumped 16 -> 22 (oldest supported Node) to fix the @types/node-vs-DOM clashes at the source; this required a 2-line NodeJS.Timer -> NodeJS.Timeout fix in app-studio-toolkit's landscape.ts.
  • The three packages are locked as a fixed Changesets group (mirrors the old Lerna locked mode); intra-repo deps use workspace:* everywhere. vscode-mta-tools' @vscode-logging/logger is switched to workspace:* so the Changesets dependents-graph stays consistent.
  • Pre-migration changelogs renamed to CHANGELOG.old.md (project + per package, both listed in files); example changelogs removed; package READMEs point at the monorepo and drop the hand-written license section (legal-copy.js handles it).
  • ESLint relaxed for projects/vscode-logging/** (same as yeoman-ui/mta-tools; TODO to tighten).
  • scripts/merge-coverage.js now also merges projects//packages/ coverage.
  • No functional change to the logger packages; all build and pass at 100% coverage. No changeset (release handled separately after merge).

Commits are staged move → format → fixes → examples for review; squash on merge.

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>
@jacob-kreyenbuehl
jacob-kreyenbuehl marked this pull request as draft August 24, 2026 12:29
@rolanbadrislamov
rolanbadrislamov self-requested a review August 24, 2026 12:49
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>
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Build Report

badge

Please note:

  1. Files only stay for around 14 days!
  2. This comment will be updated with the data of the last successful build of this PR.
Name Link
Commit 0851a9a
Logs https://github.com/SAP/app-studio-toolkit/actions/runs/32943182518
VSIX Files https://github.com/SAP/app-studio-toolkit/actions/runs/32943182518/artifacts/9597350037

Comment thread projects/vscode-logging/examples/extension-wrapper/tsconfig.json
Comment thread projects/vscode-logging/examples/extension/.gitignore Outdated
Comment thread projects/vscode-logging/examples/extension/package.json
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>
Comment thread projects/vscode-logging/CHANGELOG.old.md
@jacob-kreyenbuehl jacob-kreyenbuehl self-assigned this Aug 25, 2026
@bd82
bd82 self-requested a review August 25, 2026 08:11
Comment thread projects/vscode-mta-tools/package.json Outdated
@SAP SAP deleted a comment from kubante Aug 25, 2026
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>
@SAP SAP deleted a comment from kubante Aug 25, 2026
@SAP SAP deleted a comment from kubante Aug 25, 2026
@jacob-kreyenbuehl
jacob-kreyenbuehl marked this pull request as ready for review August 25, 2026 09:07
….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>
@bd82

bd82 commented Aug 25, 2026

Copy link
Copy Markdown
Member

I think there is value to transfer (most of) the old root README.md even if its tiny.
For example see: https://github.com/SAP/app-studio-toolkit/tree/main/projects/vscode-mta-tools
Because with this projects/*/pkgX hierarchy it would explain what each project is.

For example: https://github.com/SAP/app-studio-toolkit/tree/main/projects/vscode-mta-tools

@bd82 bd82 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

  1. Their version means little, they are not published.
  2. Would locking them create more github tags spam when one of the three productive packages are released

Comment thread projects/vscode-mta-tools/package.json
Comment thread projects/vscode-logging/packages/wrapper/tsconfig.json Outdated
Comment thread projects/vscode-logging/packages/wrapper/README.md Outdated
Comment thread projects/vscode-logging/packages/wrapper/README.md Outdated
Comment thread projects/vscode-logging/packages/wrapper/README.md Outdated
Comment thread projects/vscode-logging/packages/logger/CHANGELOG.old.md
Comment thread projects/vscode-logging/examples/library/package.json Outdated
Comment thread projects/vscode-logging/examples/extension/package.json Outdated
Comment thread projects/vscode-logging/examples/extension-wrapper/package.json Outdated
Comment thread scripts/merge-coverage.js
…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>
@jacob-kreyenbuehl

Copy link
Copy Markdown
Contributor Author

thanks for the thorough review @bd82, really helpful. i pushed 6 commits addressing everything:

  • @types/node -> 22 + removed skipLibCheck (f552c2e). you were right it was only the old @types/node. the bump also needed 2 small type fixes in app-studio-toolkit landscape.ts (Timer -> Timeout), included in the same commit.
  • fixed changeset group for logger/types/wrapper, examples excluded (056ad90). note: types is on 2.0.8 vs 2.0.9 for the other two, the fixed group will line them up on the first release.
  • per-package changelogs -> CHANGELOG.old.md + added both to the files field, and deleted the example changelogs (b8e2f53).
  • workspace: everywhere* (c8c2df5).
  • README fixes on the 3 packages (de9c186) and a new project README (b99a080).

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.

@jacob-kreyenbuehl
jacob-kreyenbuehl requested a review from bd82 August 26, 2026 07:27
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>
@bd82 bd82 changed the title Migrate/vscode logging chore: migrate vscode-logging Aug 26, 2026
@jacob-kreyenbuehl
jacob-kreyenbuehl merged commit 2f8b2b1 into main Aug 26, 2026
4 checks passed
@jacob-kreyenbuehl
jacob-kreyenbuehl deleted the migrate/vscode-logging branch August 26, 2026 11:56
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.

4 participants