Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking change: 3.4.3 no longer has exports in package.json #444

Open
jpoehnelt opened this issue Mar 22, 2022 · 2 comments
Open

Breaking change: 3.4.3 no longer has exports in package.json #444

jpoehnelt opened this issue Mar 22, 2022 · 2 comments

Comments

@jpoehnelt
Copy link

jpoehnelt commented Mar 22, 2022

Versions 3.4.1/2/3 introduced breaking changes with the removal of exports and types. These changes are also not reflected in this repository.

{
  "version": "3.4.0",
  "name": "gl-matrix",
  "description": "Javascript Matrix and Vector library for High Performance WebGL apps",
  "sideEffects": false,
  "type": "module",
  "main": "./dist/esm/index.js",
  "module": "./dist/esm/index.js",
  "exports": {
    ".": "./dist/esm/index.js",
    "./common": "./dist/esm/common.js",
    "./mat2": "./dist/esm/mat2.js",
    "./mat2d": "./dist/esm/mat2d.js",
    "./mat3": "./dist/esm/mat3.js",
    "./mat4": "./dist/esm/mat4.js",
    "./quat": "./dist/esm/quat.js",
    "./quat2": "./dist/esm/quat2.js",
    "./vec2": "./dist/esm/vec2.js",
    "./vec3": "./dist/esm/vec3.js",
    "./vec4": "./dist/esm/vec4.js"
  },
  "types": "./dist/index.d.ts",
  "homepage": "http://glmatrix.net",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/toji/gl-matrix/issues"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/toji/gl-matrix.git"
  },
  "contributors": [...],
  "scripts": {
    "test": "mocha --require @babel/register --recursive spec",
    "doc": "jsdoc -c jsdoc.config.json",
    "update-license-version": "node utils/update-license-version.js",
    "build-umd": "rollup -c",
    "build-esm": "babel src -d dist/esm",
    "build-dts": "tsc --allowJs --declaration --emitDeclarationOnly --module amd --outFile ./dist/index.d.ts ./src/index.js ./src/types.d.ts && node ./utils/bundle-dts.js && tsc --noEmit ./dist/index.d.ts",
    "build": "del dist && npm run update-license-version && npm run build-umd && npm run build-esm && npm run build-dts && node ./utils/build.js",
    "prepare": "npm run build"
  },
  "devDependencies": {
    "@babel/cli": "^7.14.3",
    "@babel/core": "^7.14.3",
    "@babel/preset-env": "^7.14.3",
    "@babel/register": "^7.13.16",
    "@rollup/plugin-babel": "^5.3.0",
    "del-cli": "^3.0.0",
    "jsdoc": "^3.6.7",
    "mocha": "^8.4.0",
    "node-libs-browser": "^2.2.1",
    "rollup": "^2.50.5",
    "rollup-plugin-size-snapshot": "^0.12.0",
    "rollup-plugin-terser": "^7.0.2",
    "typescript": "^4.3.2"
  }
}

became

{
  "version": "3.4.3",
  "name": "gl-matrix",
  "description": "Javascript Matrix and Vector library for High Performance WebGL apps",
  "sideEffects": false,
  "main": "cjs/index.js",
  "module": "esm/index.js",
  "homepage": "http://glmatrix.net",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/toji/gl-matrix/issues"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/toji/gl-matrix.git"
  },
  "contributors": [...]
}
@artemtumin
Copy link

I also faced that my component ( which imports gl-matrix ) makes jest hanging. It was OK on version 4.3.0

@donmccurdy
Copy link

Context:

My understanding is that 3.4.x was itself a breaking change unintentionally, because of the exports, and so that change had to be reverted. It looks like the plan is to bring full ESM and 'exports' support back in v4, instead:

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

No branches or pull requests

3 participants