diff --git a/.github/workflows/gitleaks.yml b/.github/workflows/gitleaks.yml index ab51b2dc28..34c9b860f6 100644 --- a/.github/workflows/gitleaks.yml +++ b/.github/workflows/gitleaks.yml @@ -6,7 +6,7 @@ jobs: gitleaks: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: wget uses: wei/wget@v1 with: diff --git a/.github/workflows/issue-reply.yml b/.github/workflows/issue-reply.yml index 396c67c5a8..c5d676ebf6 100644 --- a/.github/workflows/issue-reply.yml +++ b/.github/workflows/issue-reply.yml @@ -10,7 +10,7 @@ jobs: steps: - name: help wanted if: github.event.label.name == 'help wanted' - uses: actions-cool/issues-helper@v1.2 + uses: actions-cool/issues-helper@v3 with: actions: 'create-comment' issue-number: ${{ github.event.issue.number }} @@ -23,7 +23,7 @@ jobs: - name: 🤔 Need Reproduce if: github.event.label.name == '🤔 Need Reproduce' - uses: actions-cool/issues-helper@v1.2 + uses: actions-cool/issues-helper@v3 with: actions: 'create-comment' issue-number: ${{ github.event.issue.number }} diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml deleted file mode 100644 index 4e2d7adeb7..0000000000 --- a/.github/workflows/node-ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Node CI - -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x, 16.x] - - steps: - - uses: actions/checkout@v3 - - - name: Install pnpm - uses: pnpm/action-setup@v2.2.4 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: pnpm run install, build - run: | - pnpm run init - env: - CI: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 18eeb7bbe4..379f654139 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,13 +9,13 @@ jobs: strategy: matrix: mode: ['normal', 'strict'] - node-version: [14.x, 16.x] + node-version: [18.x, 20.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install pnpm - uses: pnpm/action-setup@v2.2.4 + uses: pnpm/action-setup@v4 - name: Get pnpm store directory id: pnpm-cache @@ -23,7 +23,7 @@ jobs: echo "pnpm_cache_dir=$(pnpm store path)" >> "$GITHUB_OUTPUT" - name: Setup pnpm cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} @@ -31,7 +31,7 @@ jobs: ${{ runner.os }}-pnpm-store- - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} diff --git a/packages/hooks/src/useControllableValue/index.ts b/packages/hooks/src/useControllableValue/index.ts index f9e7759990..eb656966c8 100644 --- a/packages/hooks/src/useControllableValue/index.ts +++ b/packages/hooks/src/useControllableValue/index.ts @@ -35,13 +35,13 @@ function useControllableValue(props: Props = {}, options: Options = } = options; const value = props[valuePropName] as T; - const isControlled = props.hasOwnProperty(valuePropName); + const isControlled = Object.prototype.hasOwnProperty.call(props, valuePropName); const initialValue = useMemo(() => { if (isControlled) { return value; } - if (props.hasOwnProperty(defaultValuePropName)) { + if (Object.prototype.hasOwnProperty.call(props, defaultValuePropName)) { return props[defaultValuePropName]; } return defaultValue; diff --git a/packages/hooks/src/useLongPress/index.ts b/packages/hooks/src/useLongPress/index.ts index a676bcef90..caa3aee13a 100644 --- a/packages/hooks/src/useLongPress/index.ts +++ b/packages/hooks/src/useLongPress/index.ts @@ -54,7 +54,7 @@ function useLongPress( }; function getClientPosition(event: EventType) { - if (event instanceof TouchEvent) { + if ('TouchEvent' in window && event instanceof TouchEvent) { return { clientX: event.touches[0].clientX, clientY: event.touches[0].clientY,