From 96bed93c9f0e5cb575ef027d77f47042f4297c8a Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Thu, 10 Nov 2022 06:01:49 +0530 Subject: [PATCH 1/3] docs: improve tutorial --- .../markdown/docs/00 Quick Start/Tutorial.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/docsite/markdown/docs/00 Quick Start/Tutorial.md b/packages/docsite/markdown/docs/00 Quick Start/Tutorial.md index a61210af77..73addfab3a 100644 --- a/packages/docsite/markdown/docs/00 Quick Start/Tutorial.md +++ b/packages/docsite/markdown/docs/00 Quick Start/Tutorial.md @@ -662,6 +662,23 @@ import { canMoveKnight, moveKnight } from './Game' import { ItemTypes } from './Constants' import { useDrop } from 'react-dnd' +const Overlay = ({color}) => { + return ( +
+ ) +} + function BoardSquare({ x, y, children }) { const black = (x + y) % 2 === 1 const [{ isOver, canDrop }, drop] = useDrop( From 1dd1bcdd39d9545fdbb319e34ddbeecf0fb9d89c Mon Sep 17 00:00:00 2001 From: Lucas Piera Date: Sat, 7 Dec 2024 08:44:03 +0100 Subject: [PATCH 2/3] chore: upgrade Node.js version in CI workflows and update action versions to latest (#3652) * chore: upgrade Node.js version in CI workflows and update action versions to latest * chore: add cache-dependency-path for yarn version check in CI workflow * chore: remove cache configuration from version check workflow * chore: enable Corepack and configure Yarn settings in CI workflow * chore: add yarn install step in CI workflow * chore: restrict CI workflows to main branch for push and pull request events --------- Co-authored-by: lukaszpiera --- .github/workflows/ci.yml | 45 ++++++++++++++-------------- .github/workflows/docsite.yml | 21 ++++++------- .github/workflows/fix-dependabot.yml | 11 +++---- .github/workflows/version-check.yml | 15 +++++++--- 4 files changed, 51 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cec3a8123..26ba0d8186 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,37 +1,41 @@ name: Node CI -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: + branches: + - main + jobs: build: runs-on: ubuntu-latest strategy: matrix: - node-version: [16.x, 18.x] + node-version: [20.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + cache: 'yarn' - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn config get cacheFolder)" - - - uses: actions/cache@v2 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - run: yarn install - name: Install Dependencies + - name: Enable Corepack + run: corepack enable + + - name: Configure Yarn + run: | + yarn config set nodeLinker node-modules + yarn config set enableGlobalCache false + - name: Install Dependencies + run: yarn install + - name: TurboRepo local server uses: felixmosh/turborepo-gh-artifacts@v2 with: @@ -47,7 +51,4 @@ jobs: TURBO_TEAM: 'react-dnd' - name: Publish coverage to codecov.io - uses: codecov/codecov-action@v1.0.13 - if: success() && matrix.node-version == '14.x' - with: - token: ${{ secrets.CODECOV_TOKEN }} + uses: codecov/codecov-action@v3 \ No newline at end of file diff --git a/.github/workflows/docsite.yml b/.github/workflows/docsite.yml index 4225ea1c0f..b87d32aa23 100644 --- a/.github/workflows/docsite.yml +++ b/.github/workflows/docsite.yml @@ -7,21 +7,22 @@ on: jobs: deploy-documentation: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: Use Node.js 16.x - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - name: Use Node.js 20.x + uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 20.x + cache: 'yarn' - run: yarn install - run: 'yarn build:' - run: yarn build:docsite - name: deploy - uses: peaceiris/actions-gh-pages@v2.10.1 - env: - ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} - PUBLISH_BRANCH: gh-pages - PUBLISH_DIR: ./packages/docsite/public + uses: peaceiris/actions-gh-pages@v3 + with: + deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} + publish_branch: gh-pages + publish_dir: ./packages/docsite/public diff --git a/.github/workflows/fix-dependabot.yml b/.github/workflows/fix-dependabot.yml index a13ca7932e..a7458ed5c5 100644 --- a/.github/workflows/fix-dependabot.yml +++ b/.github/workflows/fix-dependabot.yml @@ -8,15 +8,16 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 2 - persist-credentials: false # minimize exposure + persist-credentials: false - - name: Use Node.js 14.x - uses: actions/setup-node@v1 + - name: Use Node.js 20.x + uses: actions/setup-node@v3 with: - node-version: '14' + node-version: '20' + cache: 'yarn' - name: Config Git run: | diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index 4e37d7dc00..f547e937bd 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -1,7 +1,14 @@ name: Version Check -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: + branches: + - main + env: - DEFAULT_NODE_VERSION: 16 + DEFAULT_NODE_VERSION: 20 jobs: version-check: runs-on: ubuntu-latest @@ -10,7 +17,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v3 with: node-version: ${{env.DEFAULT_NODE_VERSION}} - - run: yarn version check + - run: yarn version check \ No newline at end of file From 1de654eb466b9563fa50df070c244d6f3ab43ca7 Mon Sep 17 00:00:00 2001 From: Martin Najemi Date: Sun, 6 Jul 2025 12:22:50 +0200 Subject: [PATCH 3/3] fix: Fix import which does not follow ESM rules (#3669) --- packages/react-dnd/src/types/connectors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-dnd/src/types/connectors.ts b/packages/react-dnd/src/types/connectors.ts index 92614f90d6..58d2bff16f 100644 --- a/packages/react-dnd/src/types/connectors.ts +++ b/packages/react-dnd/src/types/connectors.ts @@ -1,6 +1,6 @@ import type { ReactElement, RefObject } from 'react' -import type { DragPreviewOptions, DragSourceOptions } from './options' +import type { DragPreviewOptions, DragSourceOptions } from './options.js' export type ConnectableElement = RefObject | ReactElement | Element | null