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

Update react-dnd monorepo to v16 (major) #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 7, 2019

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react-dnd ^5.0.0 -> ^16.0.1 age adoption passing confidence
react-dnd-html5-backend ^5.0.1 -> ^16.0.1 age adoption passing confidence

Release Notes

react-dnd/react-dnd (react-dnd)

v16.0.1

Compare Source

v16.0.0

Compare Source

Major

v15.1.2

Compare Source

The utility packages @react-dnd/invariant, @react-dnd/shallowequal, and @react-dnd/asap (which are forks of popular libraries) have been included in the monorepo and built using the same output mechanisms as the react-dnd core packages (dual EJS/CSM).

@react-dnd/asap has been simplified to remove the node variant, which relied on deprecated APIs

v15.1.1

Compare Source

v15.1.0

Compare Source

  • All packages now have verified ESM support
  • Packages expose CJS/ESM surface are via pkg.exports

v15.0.2

Compare Source

This release uses output from swc using the 'es2017' target instead of using output from 'tsc' using the 'ESNext' target.

v15.0.1

Compare Source

This release fixes issues with the ESM-only structure of v15.0.0. All packages are now in their prior CommonJS/ESM format.

v15.0.0

Major Changes
  • ~~The react-dnd packages are now published as ESM-only with type: module. See this FAQ by sindresorhus: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c~~

  • The Decorators API has been removed and fully replaced by the Hooks API. The Decorators API was difficult to develop & type correctly, and this improves its maintainability.

  • The builds no longer use babel & preset-env. The library is transpiled using SWC into the "es2017" target, which assumes async/await is available. This should reduce bundle sizes by removing polyfills and support-code which may be unnecessary in your target.

Bugfixes
  • Improve data-transfer acquisition from File inputs (#​3262)
  • Don't set the 'draggable' attribute unless canDrag is true (#​3187)
  • Improve typings of DropTargetMonitor, DragLayerMonitor (#​3300, #​3341)

v14.0.3

Compare Source

Updated

react-dnd: 14.0.3
react-dnd-html5-backend: 14.0.1
react-dnd-touch-backend: 14.1.0

Patch Updates

  • Fix drop operations in iframes & child windows (#​3181) (thanks @​eramdam!)
  • Refactor TouchBackend OptionsReader (#​3291)
  • Cleanup connected DOM elements from react-dnd internals when hook-based components unmount (#​3290)
  • Fix issue where custom drag-sources where triggering native drops in Firefox (#​3272) (thanks @​istateside)

v14.0.2

Compare Source

Patch

This PR will throw a developer exception if a user specifies a useDrag::spec.begin method.

v14.0.1: 14.0.1

Compare Source

Patch

Update internal hook useDragType() to align with updated typings. Check 14.0.0 release for API changes

v14.0.0: 14.0.0

Compare Source

This release addresses a handful of nagging liveness and ergonomic issues with the hooks API.

The liveness issues affect all hooks, and were discovered on deeper inspection of certain stress tests in the documentation. The internal useCollector() hook is used to collect props from the DnD system when things change. Prior to this update, we subscribed to updates from the DnD monitor to trigger prop collection. However, state on the react side was only accounted for on the first render. This release improves that liveness by collecting props whenever react state changes.

The ergonomics of the useDrag have been refactored. In short:

  • spec.type is required
  • spec.item can be a function or static object.
  • The function version of spec.item replaces spec.begin

Since the release of the hooks API, we packed type under spec.item. However, this led to nonintuitive situations where an item field was required to be specified even though items are created in the begin method.

Additionally, in the original React-DnD design, beginDrag() was optional and the type of the draggables had to be defined. If no explicit DragObject was created, an implicit object was created by the system..

The change we've made here decouples type from item, and collapses begin into item.

// Pre-v14
useDrag({
   // item defined here to get a type
   item: { type: BOX } },
   // ...but the actual item is created here
   begin: () => ({ id })
})

// v14
useDrag({
   type: BOX,
   item: () => ({id})
})

e.g. useDrag({ item: { type: BOX }}) => useDrag({ type: 'BOX' })

We've also added the ability to cancel drag operations in the hooks API by returning null from begin.

// new API
useDrag({
  type: BOX,
  item: () => shouldNotDrag ? null : {id},
})

v13.1.1

Compare Source

react-dnd

Patch
  • Re-register drag sources in hooks API when item.type changes
  • Export missing typings

react-dnd-html5-backend

Patch

  • Export HTML5Context, HTML5BackendOptions interfaces

v13.1.0

Compare Source

react-dnd

TLDR: useDrag and useDrop support both a memo pattern and a spec object now.

useDrag(() => spec) // good
useDrag(spec) // also good

In v13, we've tried to address some errors that were pervading with the react-dnd hooks API. Generally, making sure DragSource/DropTargets were up-to-date and that the system wasn't leaking handles was a precarious balancing act. Moving to a memo API pattern (e.g. useDrag(() => spec)) fixed this problem in our tests.

However, as we dug further into handler leakage issues, it became clear that anything using the hooks would reattach and receive a new handler ID whenever the spec changed at all. This was in contrast to the Decorator API's behavior of keeping stable handler IDs as the incoming props changed.

To fix the Hooks API to stop leaking handlers, we found a pretty simple solution: a classical class with a public setter for the spec object that's updated via a useEffect hook. This neatly avoids the mutating DragSource/DropTargets on every spec change. This had two effects: identifiers have been stabilized, and spec objects were usable again because changing them didn't cause DragSource/DropTarget instances to be regenerated and reattached.

In retrospect, this undoes the necessity of the major cut that happened with v13, but the Hooks API is much sturdier now. We hope that you find the improved memory stability in the hooks API to be useful in your projects.

v13.0.1

Compare Source

Patch Updates

  • Add invariant() invocations in useDrag, useDrop to verify that spec functions are used instead of objects
  • Fix handler registration memory leak issue with useDrag, useDrop

v13.0.0

React-DnD v13, Others v12

v12 was largely structural and organizational, but some issues were discovered shortly after release that warranted changing the hooks API.

Breaking Changes

  • useDrag, useDrop hooks accept functions that create spec objects instead of spec objects directly. Clients can think about the API to useDrag() and useDrop() as being analogous to useMemo(). This allows clients to have direct control over when their DnD specifications are re-generated (which internally reattaches them to the DnD system).
  • Use jsx-factory throughout the library

Non-Breaking Changes

  • Add HTML native draggable type to HTML5Backend (see new example)
  • Clients can specify a rootElement component in the HTML5Backend options to localize where DnD will process events in the client app.
  • react-dnd-test-utils has improved support for testing with HTML5Backend and using @​testing-library/react to simulate drag-and-drop sequences.

v11.1.3

Compare Source

Patch

Update .npmignore files so that tsbuildinfo files are not included in publication. This reduces package sizes.

v11.1.1

Compare Source


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from 145e607 to 4ae6a68 Compare May 7, 2019 22:35
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from 4ae6a68 to ea6331d Compare June 7, 2019 07:04
@renovate renovate bot changed the title Update react-dnd monorepo (major) Update react-dnd monorepo to v7 (major) Jun 7, 2019
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from ea6331d to 8196708 Compare June 7, 2019 18:42
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from 8196708 to b5a4225 Compare June 14, 2019 21:00
@renovate renovate bot changed the title Update react-dnd monorepo to v7 (major) Update react-dnd monorepo (major) Jun 14, 2019
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch 2 times, most recently from 7df5405 to 2e729b9 Compare June 14, 2019 22:28
@renovate renovate bot changed the title Update react-dnd monorepo (major) Update react-dnd monorepo to v8 (major) Jun 14, 2019
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch 2 times, most recently from bdf4bfe to e8bfc90 Compare June 21, 2019 18:14
@renovate renovate bot changed the title Update react-dnd monorepo to v8 (major) Update react-dnd monorepo (major) Jun 21, 2019
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from e8bfc90 to e702c36 Compare June 21, 2019 18:14
@renovate renovate bot changed the title Update react-dnd monorepo (major) Update react-dnd monorepo to v7 (major) Jun 21, 2019
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from e702c36 to 6ae1659 Compare June 21, 2019 20:16
@renovate renovate bot changed the title Update react-dnd monorepo to v7 (major) Update react-dnd monorepo (major) Jun 21, 2019
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from 6ae1659 to dc25289 Compare June 21, 2019 20:16
@renovate renovate bot changed the title Update react-dnd monorepo (major) Update react-dnd monorepo to v8 (major) Jun 21, 2019
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from dc25289 to ba1d60a Compare July 3, 2019 22:58
@renovate renovate bot changed the title Update react-dnd monorepo to v8 (major) Update react-dnd monorepo to v9 (major) Jul 3, 2019
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from ba1d60a to 1749c15 Compare July 4, 2019 15:27
@renovate renovate bot changed the title Update react-dnd monorepo to v9 (major) Update react-dnd monorepo (major) Jul 4, 2019
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from 1749c15 to bf79e08 Compare July 10, 2019 21:36
@renovate renovate bot changed the title Update react-dnd monorepo (major) Update react-dnd monorepo to v9 (major) Jul 10, 2019
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from bf79e08 to 88a5695 Compare July 11, 2019 04:51
@renovate renovate bot changed the title Update react-dnd monorepo to v9 (major) Update react-dnd monorepo (major) Jul 11, 2019
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from 88a5695 to ca0bea7 Compare July 11, 2019 16:54
@renovate renovate bot changed the title Update react-dnd monorepo (major) Update react-dnd monorepo to v9 (major) Jul 11, 2019
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from ca0bea7 to 8c6167f Compare July 12, 2019 00:42
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from 8c6167f to 8bd32a9 Compare July 24, 2019 10:43
@renovate renovate bot changed the title Update react-dnd monorepo to v15 (major) Update react-dnd monorepo (major) Feb 6, 2022
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from 1d9ab06 to e12cc0e Compare February 7, 2022 22:35
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch 3 times, most recently from ad7e40a to ef629ec Compare April 5, 2022 20:11
@renovate renovate bot changed the title Update react-dnd monorepo (major) Update react-dnd monorepo to v16 (major) Apr 5, 2022
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch 2 times, most recently from 63314ef to 025a646 Compare April 19, 2022 19:09
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from 025a646 to d17b605 Compare May 18, 2022 20:08
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from d17b605 to b5a90fd Compare July 6, 2022 20:24
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from b5a90fd to 81d4858 Compare August 4, 2022 04:12
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch 2 times, most recently from 70ae4cd to 4af52b2 Compare September 29, 2022 20:11
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from 4af52b2 to 37b736c Compare October 12, 2022 06:43
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from 37b736c to 773c4d7 Compare October 29, 2022 06:08
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from 773c4d7 to 85881a1 Compare December 8, 2022 07:48
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch 2 times, most recently from dc13bcc to 783d7a7 Compare January 13, 2023 01:32
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from 783d7a7 to ae39d1d Compare January 26, 2023 19:40
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch 3 times, most recently from 2fd9860 to 35b702e Compare February 17, 2023 06:18
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from 35b702e to 18744c7 Compare March 15, 2023 18:05
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch 2 times, most recently from 2e598e2 to a744b55 Compare April 4, 2023 23:14
@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch 2 times, most recently from 4f2eb25 to 6be5265 Compare June 15, 2023 23:33
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate
Copy link
Contributor Author

renovate bot commented Jul 20, 2023

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
/usr/local/bin/docker: line 4: .: filename argument required
.: usage: . filename [arguments]
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @babel/eslint-parser@7.22.9
npm ERR! Found: eslint@6.8.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^6.8.0" from the root project
npm ERR!   peerOptional eslint@">= 6" from fork-ts-checker-webpack-plugin@6.5.2
npm ERR!   node_modules/@storybook/core-common/node_modules/fork-ts-checker-webpack-plugin
npm ERR!     fork-ts-checker-webpack-plugin@"^6.0.4" from @storybook/core-common@6.5.16
npm ERR!     node_modules/@storybook/core-common
npm ERR!       @storybook/core-common@"6.5.16" from @storybook/builder-webpack4@6.5.16
npm ERR!       node_modules/@storybook/builder-webpack4
npm ERR!         @storybook/builder-webpack4@"6.5.16" from @storybook/core-server@6.5.16
npm ERR!         node_modules/@storybook/core-server
npm ERR!       4 more (@storybook/core-server, @storybook/manager-webpack4, ...)
npm ERR!   5 more (eslint-config-airbnb, eslint-config-airbnb-base, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^7.5.0 || ^8.0.0" from @babel/eslint-parser@7.22.9
npm ERR! node_modules/@babel/eslint-parser
npm ERR!   dev @babel/eslint-parser@"^7.22.9" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: eslint@8.45.0
npm ERR! node_modules/eslint
npm ERR!   peer eslint@"^7.5.0 || ^8.0.0" from @babel/eslint-parser@7.22.9
npm ERR!   node_modules/@babel/eslint-parser
npm ERR!     dev @babel/eslint-parser@"^7.22.9" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /tmp/worker/faf112/ace23d/cache/others/npm/_logs/2023-07-20T18_35_21_131Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /tmp/worker/faf112/ace23d/cache/others/npm/_logs/2023-07-20T18_35_21_131Z-debug-0.log

@renovate renovate bot force-pushed the renovate/major-react-dnd-monorepo branch from 6be5265 to 97497a4 Compare July 20, 2023 18:35
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.

None yet

0 participants