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

fix(deps): react-shallow-renderer v16.15.0 for react v18 compat #34104

Merged

Conversation

mikehardy
Copy link
Contributor

Summary

It improves the developer experience a lot to have all your dependencies use react v18, this one still wanted v17 causing npm and npx et al a great deal of resolution stress (warnings, some errors in certain conditions)

See reactwg/react-native-releases#23 (comment)

This bumps the dependency from 16.14.x to 16.15.0 in order to pull in their first react v18 compatible release.
It mirrors part of a change that already landed on react-native#main

Changelog

[General] [Fixed] - use react-v18-compatible version of react-shallow-renderer

Test Plan

CI ran it on main already, CI should run against the branch. You can also modify it locally and see it works in <yourapp>/node_modules/react-native/package.json

@mikehardy mikehardy requested a review from hramos as a code owner June 29, 2022 20:43
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Sony Partner: Sony labels Jun 29, 2022
@mikehardy mikehardy requested a review from cortinico June 29, 2022 20:44
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jun 29, 2022
@cortinico
Copy link
Contributor

Thanks for sending this over @mikehardy. Can I ask you to open a similar PR also against main?

@pull-bot
Copy link

pull-bot commented Jun 29, 2022

Fails
🚫

node failed.

Warnings
⚠️ 🔒 package.json - Changes were made to package.json. This will require a manual import by a Facebook employee.

Log

Error:  RequestError [HttpError]: Must have admin rights to Repository.
    at /root/react-native/bots/node_modules/@octokit/request/dist-node/index.js:86:21
    at processTicksAndRejections (internal/process/task_queues.js:95:5) {
  status: 403,
  response: {
    url: 'https://api.github.com/repos/facebook/react-native/issues/34104/labels',
    status: 403,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      connection: 'close',
      'content-encoding': 'gzip',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Thu, 07 Jul 2022 16:57:36 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'GitHub.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      'transfer-encoding': 'chunked',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-accepted-oauth-scopes': '',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-media-type': 'github.v3; format=json',
      'x-github-request-id': 'B08C:429B:6E1CE8:127FB56:62C71080',
      'x-oauth-scopes': 'public_repo',
      'x-ratelimit-limit': '5000',
      'x-ratelimit-remaining': '4992',
      'x-ratelimit-reset': '1657216655',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '8',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Must have admin rights to Repository.',
      documentation_url: 'https://docs.github.com/rest/reference/issues#add-labels-to-an-issue'
    }
  },
  request: {
    method: 'POST',
    url: 'https://api.github.com/repos/facebook/react-native/issues/34104/labels',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'octokit-rest.js/18.12.0 octokit-core.js/3.5.1 Node.js/14.19.0 (linux; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: '{"labels":["Pick Request"]}',
    request: { hook: [Function: bound bound register] }
  }
}
danger-results://tmp/danger-results.json

Generated by 🚫 dangerJS against 1afffd3

@analysis-bot
Copy link

analysis-bot commented Jun 29, 2022

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,794,949 -4,716
android hermes armeabi-v7a 7,196,376 +2,006
android hermes x86 8,103,481 -6,825
android hermes x86_64 8,083,326 -6,689
android jsc arm64-v8a 9,667,984 -28,751
android jsc armeabi-v7a 8,438,444 -13,551
android jsc x86 9,616,904 -30,581
android jsc x86_64 10,214,293 -30,959

Base commit: 64fe676
Branch: main

@mikehardy
Copy link
Contributor Author

I'm not sure I can actually, main already has this dependency bumped in package.json + yarn.lock so there's no diff to PR ?

@cortinico
Copy link
Contributor

I'm not sure I can actually, main already has this dependency bumped in package.json + yarn.lock so there's no diff to PR ?

Yup my bad, I was on a wrong revision once I checked this 👍 We're good with just this PR

@kelset
Copy link
Contributor

kelset commented Jul 7, 2022

cc @cortinico any chance we can get this across the finish line? 😇 since it's 0.69 CI tests that are getting broken I'm not sure if it's expected or @mikehardy needs to submit some fix or something

@mikehardy
Copy link
Contributor Author

mikehardy commented Jul 7, 2022

I am looking at the PR again and I don't think there is anything I need to do on it or can do on it ? Seems minimal + correct to me

[edit: I attempted to re-run the failing pipelines, who knows maybe they work, seemed like unrelated failures]

@mikehardy
Copy link
Contributor Author

analyze_pr is not going to self-resolve, it is some token thing:

Could not add a commit status, the GitHub token for Danger does not have access rights.

prepare_hermes_workspace had some deb install error while preparing the operating system, it did not even get to the part where anything we do here would have an effect.

🤷 frustrating CI experience, as unsolicited "user" experience. Needs a visit to the CI-deflaker, but having done that in other projects I know that's time-consuming as an upfront investment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Sony Partner: Sony Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants