Skip to content

Missing files in package.json exports field #375

@ericelliott

Description

@ericelliott

The exports field is missing the esm exports (and possibly others -- investigate, please). We need to fix that so that people can import the esm files in projects with native esm support, e.g.:

{
  "name": "riteway",
  "version": "8.0.0",
  "description": "Unit tests that always supply a good bug report when they fail.",
  "main": "source/index.js",
  "module": "source/riteway.js",
  "types": "./index.d.ts",
  "exports": {
    ".": "./source/index.js",
    "./esm/riteway.js": {
      "import": "./esm/riteway.js",
      "types": "./esm/riteway.d.ts"
    },
    "./esm/match.js": {
      "import": "./esm/match.js",
      "types": "./esm/match.d.ts"
    },
    "./esm/render.js": {
      "import": "./esm/render-component.js",
      "types": "./esm/render-component.d.ts"
    },
    "./esm/index.js": {
      "import": "./esm/index.js"
    },
    "./esm/vitest.js": {
      "import": "./esm/vitest.js"
    },
    "./esm/test.js": {
      "import": "./esm/test.js"
    },
    "./esm/match-test.js": {
      "import": "./esm/match-test.js"
    },
    "./esm/vitest.test.jsx": {
      "import": "./esm/vitest.test.jsx"
    },
    "./vitest": {
      "import": "./source/vitest.js",
      "require": "./source/vitest.js",
      "types": "./vitest.d.ts"
    },
    "./match": {
      "import": "./source/match.js",
      "require": "./source/match.js",
      "types": "./match.d.ts"
    },
    "./render-component": {
      "import": "./source/render-component.js",
      "require": "./source/render-component.js",
      "types": "./render-component.d.ts"
    }
  },
  "bin": {
    "riteway": "./bin/riteway"
  },
  "scripts": {
    "lint": "eslint source && echo 'Lint complete.'",
    "lint-fix": "eslint --fix source && eslint --fix ./*.js",
    "typecheck": "npx -p typescript tsc --esModuleInterop --rootDir . source/test.js --allowJs --checkJs --noEmit --lib es6 --jsx react && npx -p typescript tsc index.d.ts --noEmit && echo 'TypeScript check complete.'",
    "ts": "npm run -s typecheck",
    "test": "node -r @babel/register source/test",
    "esm": "cp source/*.js esm/ && cp source/*.jsx esm/ && cp esm/riteway.js esm/index.js && echo 'esm complete.'",
    "watch": "watch 'clear && npm run -s test | tap-nirvana && npm run -s lint && npm run -s typecheck && npm run -s esm' source",
    "precommit": "npm run -s test && npm run -s lint-fix && npm run -s typecheck",
    "update": "updtr",
    "release": "release-it"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/ericelliott/riteway.git"
  },
  "author": "Eric Elliott",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/ericelliott/riteway/issues"
  },
  "homepage": "https://github.com/ericelliott/riteway#readme",
  "devDependencies": {
    "@babel/core": "^7.28.3",
    "@babel/plugin-transform-runtime": "^7.28.3",
    "@babel/preset-env": "^7.28.3",
    "@babel/preset-react": "^7.27.1",
    "@babel/register": "^7.28.3",
    "@babel/runtime-corejs2": "^7.28.3",
    "@types/cheerio": "^1.0.0",
    "@types/node": "^24.3.0",
    "@types/react": "^19.1.10",
    "eslint": "^9.33.0",
    "eslint-plugin-react": "^7.37.5",
    "react": "19.1.1",
    "release-it": "^19.0.4",
    "tap-nirvana": "1.1.0",
    "typescript": "^5.9.2",
    "updtr": "4.1.0",
    "watch": "^1.0.2"
  },
  "dependencies": {
    "cheerio": "1.1.2",
    "esm": "3.2.25",
    "react-dom": "19.1.1",
    "tape": "^5.9.0",
    "vitest": "^3.2.4"
  }
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions