Skip to content

chore: esm only#24

Open
dopry wants to merge 1 commit into
nextfrom
chore/esm
Open

chore: esm only#24
dopry wants to merge 1 commit into
nextfrom
chore/esm

Conversation

@dopry

@dopry dopry commented Sep 20, 2025

Copy link
Copy Markdown
Owner

!BREAKING CHANGE:

@dopry
dopry requested a review from Copilot September 20, 2025 03:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR transitions the project from a dual CommonJS/ESM build setup to ESM-only, representing a breaking change that simplifies the build configuration and modernizes the package structure.

  • Removes dual build system and related TypeScript configurations
  • Updates package.json to specify "type": "module" and consolidates entry points
  • Replaces CommonJS module detection pattern with ESM equivalent using import.meta.url

Reviewed Changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tsconfig.test.json Removed test-specific TypeScript configuration
tsconfig.mjs.json Removed ESM-specific TypeScript configuration
tsconfig.cjs.json Removed CommonJS-specific TypeScript configuration
src/index.ts Updated module detection from require.main to import.meta.url pattern
package.json Set module type to ESM, updated build scripts, and replaced ts-node with tsx
fixup.sh Removed build script that created dual package.json files
.eslintrc Minor formatting cleanup and removed mocha environment
.cfignore Removed Cloud Foundry ignore file
.babelrc Removed Babel configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/index.ts Outdated
@dopry
dopry force-pushed the chore/esm branch 2 times, most recently from 3533cd3 to 8b040f6 Compare September 20, 2025 03:58
@dopry
dopry requested a review from Copilot June 26, 2026 19:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 11 changed files in this pull request and generated 3 comments.

Comment thread src/index.ts Outdated
Comment thread package.json Outdated
Comment thread package.json
@dopry
dopry force-pushed the chore/esm branch 8 times, most recently from d27f64a to f60fe95 Compare June 26, 2026 19:59
@dopry
dopry requested a review from Copilot June 26, 2026 20:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 32 out of 35 changed files in this pull request and generated 6 comments.

Comment thread src/index.ts
Comment on lines +84 to 87
const entry = process.argv[1] ? realpathSync(process.argv[1]) : "";
if (entry && realpathSync(import.meta.filename) === entry) {
main();
}
Comment on lines 1 to +2
import { gt } from "semver";
import { PecansRelease } from "../models";
import { PecansRelease } from "../models/index.js";
@@ -1,4 +1,4 @@
import { PecansRelease } from "../models";
import { PecansRelease } from "../models/index.js";
Comment thread vitest.config.ts
Comment on lines 11 to 14
// TypeScript configuration
typecheck: {
tsconfig: "./tsconfig.test.json",
tsconfig: "./tsconfig.json",
},
Comment thread src/pecans.ts
Comment on lines 1 to 3
import Debug from "debug";
import { NextFunction, Request, Response, Router } from "express";
import { type NextFunction, type Request, type Response, Router } from "express";
import useragent from "express-useragent";
Comment thread src/pecans.ts
import { generateRELEASES, parseRELEASES } from "./utils/win-releases.js";
import { type VersionFilterOpts, Versions } from "./versions.js";

const logger = Debug("pecans");
!BREAKING CHANGE:
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.

2 participants