nitrojs / nitrojs/nitro

Automatically detect package aliases

Open
#1,574 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement pnpm v2
Dominant language
TypeScript
Stars
11.2k
Forks
899
Avg merge
2d 24m
Merged PRs (30d)
40

Description

Context of the issue: https://github.com/unjs/nitro/pull/1553

When tracing external packages, pnpm uses symlinks to the aliases package name from expected name that makes tracing aliases virtually impossible.

Currently, it is possible to specify aliases directly in config:

import { defineNitroConfig } from "nitropack/config";

export default defineNitroConfig({
  externals: {
    traceAlias: {
      "@sxzz/popperjs-es": "@popperjs/core",
    },
  },
});

Since we have access to the project package.json and tracked dependencies, we might make it automated (to an extend). One possible limitation is when more than one possible alias target is discovered.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked pull request and the externals.traceAlias configuration shown in the issue, then inspect how the project package.json and tracked dependencies are used for external-package tracing. Define how an alias is detected and how multiple possible targets are handled; done means supported aliases are detected automatically without requiring equivalent manual configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.