Skip to content

Browser Installation notes#40

Merged
magmacomputing merged 3 commits into
mainfrom
feature/installation
Jun 11, 2026
Merged

Browser Installation notes#40
magmacomputing merged 3 commits into
mainfrom
feature/installation

Conversation

@magmacomputing

@magmacomputing magmacomputing commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Documentation
    • Overhauled installation guidance into a “Browser & Native Environments” section with Global Bundle, esm.sh (Smart CDN), Granular ESM, and UMD/module examples; updated to Tempo v3 and polyfill v0.5.1.
    • Added an Advanced Usage note directing readers to the Browser Installation Guide for plugin/CDN scenarios.
  • Documentation
    • Updated import-map guidance and added import-map entries for enum and runtime license modules; clarified cache-busting and resolution notes.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5d1485f4-a535-4c62-bbe0-ba310e62b484

📥 Commits

Reviewing files that changed from the base of the PR and between 7fe9bbb and 56e9577.

📒 Files selected for processing (3)
  • packages/tempo/README.md
  • packages/tempo/doc/installation.md
  • packages/tempo/importmap.json
✅ Files skipped from review due to trivial changes (2)
  • packages/tempo/README.md
  • packages/tempo/doc/installation.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/tempo/importmap.json

📝 Walkthrough

Walkthrough

This PR updates Tempo's browser installation guidance across README and docs to present Global Bundle, Smart CDN (esm.sh), and Granular ESM approaches with examples updated to Tempo v3 and newer polyfill pins; the importmap adds two new module entries to support granular subpaths and plugin modules.

Changes

Browser Distribution Documentation and Configuration

Layer / File(s) Summary
Core browser distribution documentation
packages/tempo/README.md, packages/tempo/doc/installation.md
Updated README and installation guide with new "Browser & Native Environments" section covering Global Bundle import map approach and UMD script usage, replacing prior Tempo v2 examples and pinning to v3 and updated polyfill versions.
Advanced granular ESM and plugin architecture
packages/tempo/doc/installation.md
Added detailed guidance for Smart CDNs (esm.sh) and Granular ESM workflow with comprehensive import map configuration targeting Tempo core, subpaths, and plugin modules pinned to v3.0.1, including cache-busting recommendations.
Import map configuration for new module specifiers
packages/tempo/importmap.json
Added two new import map entries: @magmacomputing/tempo/enums and #tempo/license, mapping to their corresponding dist bundle files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • magmacomputing/magma#34: Overlaps on adding the #tempo/license subpath to Tempo’s importmap and related vitest/module-resolution aliases.
  • magmacomputing/magma#35: Related changes to #tempo/* resolution and package.json module resolution adjustments affecting granular subpath resolution.
  • magmacomputing/magma#31: Aligns with license validator and plugin licensing code touched by the new #tempo/license import entry.

Poem

🐇 In Tempo's garden I hop, so spry,

Bundles and CDNs wave in the sky,
v3 wears a hat of shiny new pins,
Enums and licenses join in the grins,
A rabbit's small cheer for neat docs and winds.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Browser Installation notes' is vague and generic, failing to clearly specify what browser installation changes were made in this PR. Consider a more specific title that describes the actual changes, such as 'Update browser installation guide for Tempo v3' or 'Migrate browser installation docs to v3 ESM bundle setup'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/installation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/tempo/importmap.json (1)

3-11: ⚠️ Potential issue | 🟡 Minor

Document hosting expectations for packages/tempo/importmap.json (and the #tempo/license internal mapping).

packages/tempo/doc/migration-guide.md calls the shipped packages/tempo/importmap.json the sanctioned browser reference and notes it’s the supported exception to hand-authoring dist/ paths, so the mixed CDN URLs (lines 3-4) and ./dist/... mappings (lines 5-11, incl. #tempo/license) looks intentional. Add a brief top-of-file comment stating that the ./dist/... entries must resolve relative to where this JSON is hosted (e.g., alongside the package’s dist/), and clarify that #tempo/license is an internal/private specifier mapping for runtime.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/tempo/importmap.json` around lines 3 - 11, Add a short top-of-file
comment in packages/tempo/importmap.json stating that the JSON is the sanctioned
browser import map for this package, that any "./dist/..." entries (e.g.,
"`@magmacomputing/tempo/core`", "…/duration", "…/mutate", "…/plugin", "…/library",
"…/enums") must resolve relative to where this JSON is hosted (typically
alongside the package's dist/), and explicitly note that "`#tempo/license`" is an
internal/private specifier used at runtime; place this comment at the very top
so readers understand the mixed CDN vs local ./dist resolution expectations.
🧹 Nitpick comments (2)
packages/tempo/README.md (1)

74-74: 💤 Low value

Heading level skip is flagged but appears intentional.

The static analysis tool flagged this h4 heading after what it perceives as an h2 (the "Installation" section at line 56). However, this structure is consistent with the sibling headings at lines 88, 101, and 130, which are all h4s representing sub-options within the collapsible "Browser & Native Environments" section.

If this heading hierarchy is intentional (h4s as option numbers within the expandable details), you can suppress the linter warning. Otherwise, consider using h3 (###) for these numbered options.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/tempo/README.md` at line 74, The h4 heading "#### 1. The Global
Bundle (Standard Usage)" under the "Browser & Native Environments" collapsible
uses h4s for numbered options and is being flagged for skipping heading levels;
either change this and the sibling option headings ("#### 2. ...", "#### 3.
...", etc.) to h3 (###) to maintain proper hierarchical order, or add a linter
suppression comment/configuration for this intentional structure so the static
analysis ignores these h4 option headings.

Source: Linters/SAST tools

packages/tempo/importmap.json (1)

11-11: 💤 Low value

Note: Unconventional use of private specifier pattern in public import map.

The #tempo/license specifier uses the Node.js private import convention (# prefix), which is typically reserved for package-internal subpath imports. While this is technically valid in Import Maps and appears to be an intentional design choice to keep the licensing module scoped, it's unconventional to expose a private-prefixed specifier in a public import map.

This pattern works correctly and is consistently documented in the installation guide. However, developers unfamiliar with this approach might find it unexpected when consuming the library.

Consider adding a brief comment in the relevant documentation explaining why the private specifier pattern is used here, if not already present.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/tempo/importmap.json` at line 11, The import map exposes a
private-style specifier "`#tempo/license`" which is unconventional for public
import maps; update the project's documentation (e.g., installation guide or
package README) to include a brief note explaining why the Node.js
private-specifier pattern (the "`#tempo/license`" entry in importmap.json) is
intentionally used and how consumers should interpret it so unfamiliar
developers are not confused.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/tempo/doc/installation.md`:
- Line 163: The dependency entry for "`@magmacomputing/tempo-plugin-astro`" in the
installation doc is using version "1.0.0" which conflicts with the README.md
granular ESM example that uses "1.1.6"; determine the correct target version
(confirm whether 1.1.6 is intended), then update the string literal
"`@magmacomputing/tempo-plugin-astro`":
"https://cdn.jsdelivr.net/npm/@magmacomputing/tempo-plugin-astro@1.0.0/dist/index.js"
to use the verified version and make the same change in the README example so
both documents reference the identical version.

---

Outside diff comments:
In `@packages/tempo/importmap.json`:
- Around line 3-11: Add a short top-of-file comment in
packages/tempo/importmap.json stating that the JSON is the sanctioned browser
import map for this package, that any "./dist/..." entries (e.g.,
"`@magmacomputing/tempo/core`", "…/duration", "…/mutate", "…/plugin", "…/library",
"…/enums") must resolve relative to where this JSON is hosted (typically
alongside the package's dist/), and explicitly note that "`#tempo/license`" is an
internal/private specifier used at runtime; place this comment at the very top
so readers understand the mixed CDN vs local ./dist resolution expectations.

---

Nitpick comments:
In `@packages/tempo/importmap.json`:
- Line 11: The import map exposes a private-style specifier "`#tempo/license`"
which is unconventional for public import maps; update the project's
documentation (e.g., installation guide or package README) to include a brief
note explaining why the Node.js private-specifier pattern (the "`#tempo/license`"
entry in importmap.json) is intentionally used and how consumers should
interpret it so unfamiliar developers are not confused.

In `@packages/tempo/README.md`:
- Line 74: The h4 heading "#### 1. The Global Bundle (Standard Usage)" under the
"Browser & Native Environments" collapsible uses h4s for numbered options and is
being flagged for skipping heading levels; either change this and the sibling
option headings ("#### 2. ...", "#### 3. ...", etc.) to h3 (###) to maintain
proper hierarchical order, or add a linter suppression comment/configuration for
this intentional structure so the static analysis ignores these h4 option
headings.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1006c002-58d5-410d-aa2c-52a7dce70e81

📥 Commits

Reviewing files that changed from the base of the PR and between cae7216 and 231ccb1.

📒 Files selected for processing (3)
  • packages/tempo/README.md
  • packages/tempo/doc/installation.md
  • packages/tempo/importmap.json

Comment thread packages/tempo/doc/installation.md Outdated
magmacomputing and others added 2 commits June 12, 2026 03:31
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@magmacomputing magmacomputing merged commit 12afe41 into main Jun 11, 2026
2 checks passed
@magmacomputing magmacomputing deleted the feature/installation branch June 11, 2026 23:52
@coderabbitai coderabbitai Bot mentioned this pull request Jun 20, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Jun 27, 2026
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.

1 participant