esm-types-export-map: ESM types export map #4

Open
std-bot wants to merge 1 commit from task/esm-types-export-map into main
First-time contributor

Assigned idea

Benchmark authoring specification.

Summary: Create a focused packaging repair around the 5.3.1 changelog entry that added package.json module exports, type declarations, and an ESM build.

Task intent: Make jodit-react consumable by downstream ESM, CommonJS, and TypeScript projects through the package export map, including the default editor export and named Jodit export.

Benchmark plan: Build the work item from commit da435e55c83e77fd93e58c88c108dc6e2fdb3a17 by seeding a focused regression in package metadata or build wiring so the package no longer exposes matching import, require, and types entries after build. The solver-facing prompt should ask for an upstream-style packaging fix for consumers importing jodit-react, without mentioning the verifier. Keep the change limited to the export map, build output wiring, and public entrypoint behavior implied by the changelog.

Environment plan: task/environment: use Node.js LTS, npm, Python 3, and an isolated temporary directory for consumer fixtures. Install dependencies with npm ci before verification. environment/repo: start from the materialized jodit/jodit-react checkout at the fixed commit and apply only the seeded packaging regression; do not require browsers, external services, or unpublished packages.

Verifier plan: test_outputs.py should run npm ci if needed, run npm run build, parse package.json, and assert that the package entry exposes consistent import, require, and types conditions. It should verify that all referenced built files exist, that import and require resolve to distinct appropriate artifacts, and that a temporary TypeScript consumer can compile an import of JoditEditor, { Jodit } from jodit-react. It should also use npm pack plus Node require.resolve/import.meta.resolve checks from a temporary consumer project.

Oracle plan: The oracle solution restores package.json export-map and type metadata to point at the actual build artifacts, fixes the ESM build output path if the seeded regression changed it, and restores the public barrel export needed for both the default React component and named Jodit export. The expected oracle patch should touch package.json and, only if necessary, webpack.config.ts or the package public entrypoint source.

Difficulty plan: Current coding systems may stop after making TypeScript compile inside the repo while missing package-level resolution behavior after npm pack. They may also confuse source imports with published package imports, overlook conditional exports, or fail to test both ESM and CommonJS consumers.

Repo patch scope: Expected upstream edits are limited to package.json, webpack.config.ts if build output wiring is wrong, and the public source entrypoint that exports JoditEditor/Jodit. Avoid broad refactors, README-only changes, or unrelated React editor logic.

Anti-leakage notes: Solver-facing materials must not mention benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context.

Approach: Seed a deterministic packaging regression, then require a normal upstream fix that aligns package metadata, built artifacts, and TypeScript declarations for published-package consumers.

Verification: Concrete verification should run npm run build, inspect package.json, execute npm pack --json, run Node require.resolve and import.meta.resolve checks from a temp consumer, and compile a temp TypeScript file importing JoditEditor, { Jodit } from jodit-react.

Risk: The main risk is relying on exact generated artifact names before inspecting the repository scripts; the verifier should derive expected paths from package.json after build rather than hard-coding unpublished filenames.

Path rules: task package is tasks/; mutable upstream checkout is tasks//environment/repo; benchmark package files are under tasks//task; verifier/container environment belongs under tasks//task/environment; regular and UI verifier logic belongs in task/tests/test_outputs.py and test.sh only runs that file through pytest.

Agent context

Task slug: esm-types-export-map
Branch: task/esm-types-export-map

## Assigned idea Benchmark authoring specification. Summary: Create a focused packaging repair around the 5.3.1 changelog entry that added package.json module exports, type declarations, and an ESM build. Task intent: Make jodit-react consumable by downstream ESM, CommonJS, and TypeScript projects through the package export map, including the default editor export and named Jodit export. Benchmark plan: Build the work item from commit da435e55c83e77fd93e58c88c108dc6e2fdb3a17 by seeding a focused regression in package metadata or build wiring so the package no longer exposes matching import, require, and types entries after build. The solver-facing prompt should ask for an upstream-style packaging fix for consumers importing jodit-react, without mentioning the verifier. Keep the change limited to the export map, build output wiring, and public entrypoint behavior implied by the changelog. Environment plan: task/environment: use Node.js LTS, npm, Python 3, and an isolated temporary directory for consumer fixtures. Install dependencies with npm ci before verification. environment/repo: start from the materialized jodit/jodit-react checkout at the fixed commit and apply only the seeded packaging regression; do not require browsers, external services, or unpublished packages. Verifier plan: test_outputs.py should run npm ci if needed, run npm run build, parse package.json, and assert that the package entry exposes consistent import, require, and types conditions. It should verify that all referenced built files exist, that import and require resolve to distinct appropriate artifacts, and that a temporary TypeScript consumer can compile an import of `JoditEditor, { Jodit }` from `jodit-react`. It should also use npm pack plus Node require.resolve/import.meta.resolve checks from a temporary consumer project. Oracle plan: The oracle solution restores package.json export-map and type metadata to point at the actual build artifacts, fixes the ESM build output path if the seeded regression changed it, and restores the public barrel export needed for both the default React component and named Jodit export. The expected oracle patch should touch package.json and, only if necessary, webpack.config.ts or the package public entrypoint source. Difficulty plan: Current coding systems may stop after making TypeScript compile inside the repo while missing package-level resolution behavior after npm pack. They may also confuse source imports with published package imports, overlook conditional exports, or fail to test both ESM and CommonJS consumers. Repo patch scope: Expected upstream edits are limited to package.json, webpack.config.ts if build output wiring is wrong, and the public source entrypoint that exports JoditEditor/Jodit. Avoid broad refactors, README-only changes, or unrelated React editor logic. Anti-leakage notes: Solver-facing materials must not mention benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context. Approach: Seed a deterministic packaging regression, then require a normal upstream fix that aligns package metadata, built artifacts, and TypeScript declarations for published-package consumers. Verification: Concrete verification should run `npm run build`, inspect `package.json`, execute `npm pack --json`, run Node `require.resolve` and `import.meta.resolve` checks from a temp consumer, and compile a temp TypeScript file importing `JoditEditor, { Jodit }` from `jodit-react`. Risk: The main risk is relying on exact generated artifact names before inspecting the repository scripts; the verifier should derive expected paths from package.json after build rather than hard-coding unpublished filenames. Path rules: task package is tasks/<slug>; mutable upstream checkout is tasks/<slug>/environment/repo; benchmark package files are under tasks/<slug>/task; verifier/container environment belongs under tasks/<slug>/task/environment; regular and UI verifier logic belongs in task/tests/test_outputs.py and test.sh only runs that file through pytest. ## Agent context Task slug: esm-types-export-map Branch: task/esm-types-export-map <!-- std-ts:idea-pr-body -->
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin task/esm-types-export-map:task/esm-types-export-map
git switch task/esm-types-export-map

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff task/esm-types-export-map
git switch task/esm-types-export-map
git rebase main
git switch main
git merge --ff-only task/esm-types-export-map
git switch task/esm-types-export-map
git rebase main
git switch main
git merge --no-ff task/esm-types-export-map
git switch main
git merge --squash task/esm-types-export-map
git switch main
git merge --ff-only task/esm-types-export-map
git switch main
git merge task/esm-types-export-map
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
snorkel/root-repository-maintenance-e12f3c587c0145!4
No description provided.