Skip to content

Updated configuration with vscode in mind#67

Draft
VisLab wants to merge 3 commits into
hed-standard:mainfrom
VisLab:remove_browser
Draft

Updated configuration with vscode in mind#67
VisLab wants to merge 3 commits into
hed-standard:mainfrom
VisLab:remove_browser

Conversation

@VisLab
Copy link
Copy Markdown
Member

@VisLab VisLab commented May 23, 2026

This PR is preliminary to removing the browser code -- it involves some minor updates to configurations.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates repository/package configuration to better support a CommonJS-oriented Node/Jest workflow (and VS Code local setup), as a preliminary step toward removing browser code.

Changes:

  • Remove "type": "module" from the root package.json and update repository/issue tracker/homepage URLs.
  • Convert jest.config.js and babel.config.js from ESM export default to CommonJS module.exports, and force Babel to emit CommonJS modules for Jest.
  • Ignore local .vscode/ and .status/ directories in .gitignore.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.

File Description
package.json Removes package-level ESM default and updates repo metadata URLs.
jest.config.js Switches Jest config export style to CommonJS for non-ESM package mode.
babel.config.js Switches Babel config to CommonJS and forces module transform to CommonJS.
.gitignore Adds ignores for local VS Code and status directories.
Comments suppressed due to low confidence (1)

package.json:9

  • Removing the root "type": "module" makes .js files in the package default to CommonJS. With the current exports map, the import condition points at ./dist/esm/index.js (ESM output from esbuild), which Node will now interpret as CommonJS and fail to load. To preserve ESM support, either emit the ESM bundle with a .mjs extension (and update exports.import), or add a dist/esm/package.json with { "type": "module" } during the build/publish step; alternatively, drop the import condition if ESM isn’t intended to be supported.
  "main": "./dist/commonjs/index.js",
  "exports": {
    ".": {
      "import": "./dist/esm/index.js",
      "require": "./dist/commonjs/index.js"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@happy5214
Copy link
Copy Markdown
Member

Can you explain your intent with these changes? In particular:

  • Why are you switching the code to CommonJS (which is outdated)?
  • Why are you pinning the max supported Node version at 24?

@VisLab
Copy link
Copy Markdown
Member Author

VisLab commented May 25, 2026

The changes were done to appease Jest without using the experimental Jest ESM support. The recommended approach is to migrate to vitest. Should we do that instead? I think we're going to have to do that anyway (we already use it in the browser code -- which is going to be removed).

@VisLab VisLab marked this pull request as draft May 29, 2026 13:52
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.

3 participants