core: decide the left-out forms of globalThis tracking in the globals and timers walk
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Funcionalidade
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- devtools
Direção de pesquisa
Start with the checkMod limits row in packages/core/README.md and the listed forms in this issue. Decide which forms should be tracked or remain documented limits, recording the choices in an issue comment; then create an issue for every form chosen for tracking. The acceptance criteria also require tests in packages/core/src/mod-check.test.ts for tracked forms and updated limits wording in the core and four consumer READMEs.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Problem
PR #198 makes the globals and timers rules of checkMod follow globalThis through a name declared once from it and never written afterwards, through a rest pattern taken from it, and through a for ... of head over an array literal holding it. Several forms stay untracked and are listed as limits in the checkMod row of packages/core/README.md, so a mod that uses fetch, process or a timer through them is accepted:
- an alias of an alias (
const g = globalThis; const h = g; h.fetch) and a rest taken from an alias; - a loop variable (
for (const g of [globalThis]) g.fetch); - an alias passed or stored elsewhere (
register(g),obj.g = g); - flow-sensitive reassignment: a name that is assigned, updated or used as a
for ... in/for ... oftarget after its declaration is dropped as an alias, not followed; - a parameter default (
function f(g = globalThis) { g.fetch }) and an assignment expression (let g; g = globalThis; g.fetch); - a
for ... ofhead over a wrapped array literal ([globalThis] as const,([globalThis])); - the TypeScript form
import x = <alias>.namethrough an alias.
Issue #144 also noted two reports of import x = name.member where TypeScript emits no runtime access: namespace process { export interface X {} } followed by import p = process.X;, and an unused import p = process.env;. They are documented as a known limit too.
Proposal
A maintainer decides, per form, whether to track it or keep it as a documented limit. Recommendation: track the alias of an alias and the wrapped array literal (cheap, no false positives), keep escaping aliases, flow-sensitive reassignment and loop variables as documented limits (they need data-flow analysis a syntactic walk cannot do without false positives), and fix the two import x = name.member over-reports by reporting only when the alias is used as a value. Any form that newly rejects mods needs a BREAKING minor changeset for the five packages that run checkMod (@kwitsch/claude-code-plugin-core, @kwitsch/rolldown-plugin-claude-code, @kwitsch/tsdown-preset-claude-code, @kwitsch/claude-code-plugin-cli, @kwitsch/vitest-plugin-claude-code-mod). Split the chosen forms into one issue each once decided.
Design points
No response
Package
core
Scope
packages/core/src/mod-check/scope-walk.ts, packages/core/src/mod-check.ts, packages/core/src/mod-check.test.ts, the Limits wording of packages/core/README.md and the four consumer READMEs. This issue only decides the scope; each form to build becomes its own issue.
Acceptance
- Each form in the list is either tracked (a test in
packages/core/src/mod-check.test.tscovers it) or stays listed as a limit inpackages/core/README.md, with the decision recorded in a comment on this issue. - An issue exists for every form chosen to be tracked.
Relations
- Originating PR: #198
- Linguagem predominante
- TypeScript
- Estrelas
- 0
- Forks
- 0
- Merge médio
- 29min
- PRs com merge (30d)
- 138
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de kwitsch/claude-code-plugin-tooling
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
kwitsch/claude-code-plugin-tooling#219 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 69/100
kwitsch/claude-code-plugin-tooling#210 ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 54/100
kwitsch/claude-code-plugin-tooling#212 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
kwitsch/claude-code-plugin-tooling#209 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
kwitsch/claude-code-plugin-tooling#208 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de kwitsch/claude-code-plugin-tooling
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
makecindy/cindy#15342 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
no-repo-link tool-submission
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 74/100
BraveOPotato/NoSignups#2618 ·
-
enhancement good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
-
bug needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Priyanshu-byte-coder/devtrack#4067 ·
Mantenedores costumam responder em até 1 dia