enzymejs / enzyme

JavaScript Testing utilities for React
https://enzymejs.github.io/enzyme/
MIT License
19.96k stars 2.01k forks source link

enzyme-adapter-react-16@1.15.6 does not include latest changes as per master #2573

Closed dalehurwitz closed 1 year ago

dalehurwitz commented 1 year ago

Steps

  1. Install the adapter: npm i --save-dev enzyme-adapter-react-16

  2. Open this file from node_modules: node_modules/enzyme-adapter-react-16/src/findCurrentFiberUsingSlowPath.js

Expectation:

Line 96 is: if (a.stateNode?.current === a) {

Reality:

Line 96 is: if (a.stateNode.current === a) {

node_modules/enzyme-adapter-react-16/package.json dump:

{
  "name": "enzyme-adapter-react-16",
  "version": "1.15.6",
  "description": "JavaScript Testing utilities for React",
  "homepage": "https://enzymejs.github.io/enzyme/",
  "main": "build",
  "scripts": {
    "clean": "rimraf build",
    "lint": "eslint --ext js,jsx .",
    "pretest": "npm run lint",
    "prebuild": "npm run clean",
    "build": "babel --source-maps=both src --out-dir build",
    "watch": "npm run build -- -w",
    "prepublish": "not-in-publish || (npm run build && safe-publish-latest && cp ../../{LICENSE,README}.md ./)"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/enzymejs/enzyme.git",
    "directory": "packages/enzyme-adapter-react-16"
  },
  "keywords": [
    "javascript",
    "shallow rendering",
    "shallowRender",
    "test",
    "reactjs",
    "react",
    "flux",
    "testing",
    "test utils",
    "assertion helpers",
    "tdd",
    "mocha"
  ],
  "author": "Jordan Harband <ljharb@gmail.com>",
  "funding": {
    "url": "https://github.com/sponsors/ljharb"
  },
  "license": "MIT",
  "dependencies": {
    "enzyme-adapter-utils": "^1.14.0",
    "enzyme-shallow-equal": "^1.0.4",
    "has": "^1.0.3",
    "object.assign": "^4.1.2",
    "object.values": "^1.1.2",
    "prop-types": "^15.7.2",
    "react-is": "^16.13.1",
    "react-test-renderer": "^16.0.0-0",
    "semver": "^5.7.0"
  },
  "peerDependencies": {
    "enzyme": "^3.0.0",
    "react": "^16.0.0-0",
    "react-dom": "^16.0.0-0"
  },
  "devDependencies": {
    "@babel/cli": "^7.12.10",
    "@babel/core": "^7.12.10",
    "babel-eslint": "^10.1.0",
    "babel-plugin-transform-replace-object-assign": "^2.0.0",
    "babel-preset-airbnb": "^4.5.0",
    "enzyme": "^3.0.0",
    "eslint": "^7.18.0",
    "eslint-config-airbnb": "^18.2.1",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-react": "^7.22.0",
    "eslint-plugin-react-hooks": "^4.2.0",
    "in-publish": "^2.0.1",
    "rimraf": "^2.7.1",
    "safe-publish-latest": "^1.1.4"
  }
}
ljharb commented 1 year ago

This is expected since it's unpublished. When an update is published, the next version will include these changes.

dalehurwitz commented 1 year ago

When is an update expected? The fix was made over a year ago right?

I'm confused as to why it's versioned as the latest but without the most recent changes.

ljharb commented 1 year ago

I'm not sure what you mean by "versioned as the latest" - everywhere on github, there should be no expectation that master/main is released/published, and you should be looking at the tag that matches the latest release version to see what's in it.

You're right that it's been a long time since it's been landed; normally there's no schedule for releases, but I'll commit to getting an update of all the adapters published in the next 24-48 hours (assuming tests still pass on master; otherwise it might take a bit longer)

dalehurwitz commented 1 year ago

Admittedly I don't know much about versioning, I just assumed that a fix would have resulted in a version bump, not applied to an existing version - that's where my confusion came from.

Thanks for getting onto this!

ljharb commented 1 year ago

v1.15.7 of the react 16 adapter has been published.