Skip to content

feat(analyze): add shared runtime target resolution#223

Open
dreyfus92 wants to merge 3 commits into
mainfrom
feat/runtime-resolver
Open

feat(analyze): add shared runtime target resolution#223
dreyfus92 wants to merge 3 commits into
mainfrom
feat/runtime-resolver

Conversation

@dreyfus92
Copy link
Copy Markdown
Collaborator

@dreyfus92 dreyfus92 commented May 12, 2026

this PR adds the shared runtime target plumbing: there’s a small resolver that reads --browserslist-query / --runtime, falls back to project Browserslist then engines.node, and sticks the result on AnalysisContext for later use. The actual checks (core-js, replacements, etc.) still behave like before we’re not switching them over yet.

we also surface the resolved target in the analyze summary (and JSON stats) so it’s obvious what the run thought the target was, added browserslist as a real dependency, and covered the resolver with a few tests.

Note

also for some reason we had a duplicated fast-wrap-ansi and I removed it.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 12, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@e18e/cli@223

commit: b575592

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

⚠️ Duplicate Dependencies (found: 25, threshold: 1)

📦 Package 📋 Versions
@ast-grep/napi
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • @ast-grep/napi@0.25.7

  • @e18e/cli@0.0.1
    • @e18e/web-features-codemods@0.2.0
      • @ast-grep/napi@0.40.5

@ast-grep/napi-darwin-arm64
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • @ast-grep/napi@0.25.7
        • @ast-grep/napi-darwin-arm64@0.25.7

  • @e18e/cli@0.0.1
    • @e18e/web-features-codemods@0.2.0
      • @ast-grep/napi@0.40.5
        • @ast-grep/napi-darwin-arm64@0.40.5

@ast-grep/napi-darwin-x64
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • @ast-grep/napi@0.25.7
        • @ast-grep/napi-darwin-x64@0.25.7

  • @e18e/cli@0.0.1
    • @e18e/web-features-codemods@0.2.0
      • @ast-grep/napi@0.40.5
        • @ast-grep/napi-darwin-x64@0.40.5

@ast-grep/napi-linux-arm64-gnu
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • @ast-grep/napi@0.25.7
        • @ast-grep/napi-linux-arm64-gnu@0.25.7

  • @e18e/cli@0.0.1
    • @e18e/web-features-codemods@0.2.0
      • @ast-grep/napi@0.40.5
        • @ast-grep/napi-linux-arm64-gnu@0.40.5

@ast-grep/napi-linux-arm64-musl
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • @ast-grep/napi@0.25.7
        • @ast-grep/napi-linux-arm64-musl@0.25.7

  • @e18e/cli@0.0.1
    • @e18e/web-features-codemods@0.2.0
      • @ast-grep/napi@0.40.5
        • @ast-grep/napi-linux-arm64-musl@0.40.5

@ast-grep/napi-linux-x64-gnu
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • @ast-grep/napi@0.25.7
        • @ast-grep/napi-linux-x64-gnu@0.25.7

  • @e18e/cli@0.0.1
    • @e18e/web-features-codemods@0.2.0
      • @ast-grep/napi@0.40.5
        • @ast-grep/napi-linux-x64-gnu@0.40.5

@ast-grep/napi-linux-x64-musl
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • @ast-grep/napi@0.25.7
        • @ast-grep/napi-linux-x64-musl@0.25.7

  • @e18e/cli@0.0.1
    • @e18e/web-features-codemods@0.2.0
      • @ast-grep/napi@0.40.5
        • @ast-grep/napi-linux-x64-musl@0.40.5

@ast-grep/napi-win32-arm64-msvc
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • @ast-grep/napi@0.25.7
        • @ast-grep/napi-win32-arm64-msvc@0.25.7

  • @e18e/cli@0.0.1
    • @e18e/web-features-codemods@0.2.0
      • @ast-grep/napi@0.40.5
        • @ast-grep/napi-win32-arm64-msvc@0.40.5

@ast-grep/napi-win32-ia32-msvc
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • @ast-grep/napi@0.25.7
        • @ast-grep/napi-win32-ia32-msvc@0.25.7

  • @e18e/cli@0.0.1
    • @e18e/web-features-codemods@0.2.0
      • @ast-grep/napi@0.40.5
        • @ast-grep/napi-win32-ia32-msvc@0.40.5

@ast-grep/napi-win32-x64-msvc
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • @ast-grep/napi@0.25.7
        • @ast-grep/napi-win32-x64-msvc@0.25.7

  • @e18e/cli@0.0.1
    • @e18e/web-features-codemods@0.2.0
      • @ast-grep/napi@0.40.5
        • @ast-grep/napi-win32-x64-msvc@0.40.5

js-tokens
2 versions
  • @e18e/cli@0.0.1
    • @vitest/coverage-v8@4.1.5
      • ast-v8-to-istanbul@1.0.0
        • js-tokens@10.0.0

  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • jscodeshift@0.16.1
        • @babel/core@7.27.4
          • @babel/code-frame@7.27.1
            • js-tokens@4.0.0

semver
3 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • ...
        • find-cache-dir@2.1.0
          • make-dir@2.1.0
            • semver@5.7.2

  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • jscodeshift@0.16.1
        • @babel/core@7.27.4
          • @babel/helper-compilation-targets@7.27.2
            • semver@6.3.1

  • @e18e/cli@0.0.1
    • enginematch@0.1.3
      • semver@7.8.0

make-dir
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • jscodeshift@0.16.1
        • @babel/register@7.27.1
          • find-cache-dir@2.1.0
            • make-dir@2.1.0

  • @e18e/cli@0.0.1
    • @vitest/coverage-v8@4.1.5
      • istanbul-lib-report@3.0.1
        • make-dir@4.0.0

eslint-visitor-keys
2 versions
  • @e18e/cli@0.0.1
    • eslint@10.3.0
      • @eslint-community/eslint-utils@4.9.1
        • eslint-visitor-keys@3.4.3

  • @e18e/cli@0.0.1
    • eslint@10.3.0
      • eslint-visitor-keys@5.0.1

balanced-match
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • ...
        • minimatch@3.1.2
          • brace-expansion@1.1.12
            • balanced-match@1.0.2

  • @e18e/cli@0.0.1
    • eslint@10.3.0
      • @eslint/config-array@0.23.5
        • minimatch@10.2.5
          • brace-expansion@5.0.5
            • balanced-match@4.0.4

brace-expansion
4 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • jscodeshift@0.16.1
        • node-dir@0.1.17
          • minimatch@3.1.2
            • brace-expansion@1.1.12

  • @e18e/cli@0.0.1
    • eslint@10.3.0
      • minimatch@10.2.4
        • brace-expansion@5.0.4

  • @e18e/cli@0.0.1
    • eslint@10.3.0
      • @eslint/config-array@0.23.5
        • minimatch@10.2.5
          • brace-expansion@5.0.5

  • @e18e/cli@0.0.1
    • typescript-eslint@8.59.2
      • ...
        • @typescript-eslint/typescript-estree@8.59.2
          • minimatch@10.2.5
            • brace-expansion@5.0.6

minimatch
3 versions
  • @e18e/cli@0.0.1
    • eslint@10.3.0
      • minimatch@10.2.4

  • @e18e/cli@0.0.1
    • eslint@10.3.0
      • @eslint/config-array@0.23.5
        • minimatch@10.2.5

  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • jscodeshift@0.16.1
        • node-dir@0.1.17
          • minimatch@3.1.2

@humanwhocodes/retry
2 versions
  • @e18e/cli@0.0.1
    • eslint@10.3.0
      • @humanfs/node@0.16.6
        • @humanwhocodes/retry@0.3.1

  • @e18e/cli@0.0.1
    • eslint@10.3.0
      • @humanwhocodes/retry@0.4.3

ignore
2 versions
  • @e18e/cli@0.0.1
    • eslint@10.3.0
      • ignore@5.3.2

  • @e18e/cli@0.0.1
    • typescript-eslint@8.59.2
      • @typescript-eslint/eslint-plugin@8.59.2
        • ignore@7.0.5

find-up
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • ...
        • find-cache-dir@2.1.0
          • pkg-dir@3.0.0
            • find-up@3.0.0

  • @e18e/cli@0.0.1
    • eslint@10.3.0
      • find-up@5.0.0

locate-path
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • ...
        • pkg-dir@3.0.0
          • find-up@3.0.0
            • locate-path@3.0.0

  • @e18e/cli@0.0.1
    • eslint@10.3.0
      • find-up@5.0.0
        • locate-path@6.0.0

picomatch
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • jscodeshift@0.16.1
        • micromatch@4.0.8
          • picomatch@2.3.1

  • @e18e/cli@0.0.1
    • tinyglobby@0.2.16
      • picomatch@4.0.4

p-limit
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • ...
        • locate-path@3.0.0
          • p-locate@3.0.0
            • p-limit@2.3.0

  • @e18e/cli@0.0.1
    • eslint@10.3.0
      • find-up@5.0.0
        • locate-path@6.0.0
          • p-locate@5.0.0
            • p-limit@3.1.0

p-locate
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • ...
        • find-up@3.0.0
          • locate-path@3.0.0
            • p-locate@3.0.0

  • @e18e/cli@0.0.1
    • eslint@10.3.0
      • find-up@5.0.0
        • locate-path@6.0.0
          • p-locate@5.0.0

path-exists
2 versions
  • @e18e/cli@0.0.1
    • module-replacements-codemods@1.2.1
      • ...
        • find-up@3.0.0
          • locate-path@3.0.0
            • path-exists@3.0.0

  • @e18e/cli@0.0.1
    • eslint@10.3.0
      • find-up@5.0.0
        • path-exists@4.0.0

💡 To find out what depends on a specific package, run: npm ls example-package

@dreyfus92 dreyfus92 requested a review from 43081j May 12, 2026 13:27
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