diff --git a/.changeset/deprecate-browser-hooks.md b/.changeset/deprecate-browser-hooks.md new file mode 100644 index 00000000..b20dd102 --- /dev/null +++ b/.changeset/deprecate-browser-hooks.md @@ -0,0 +1,18 @@ +--- +'react-simplikit': patch +--- + +Deprecate hooks that depend on browser-specific APIs + +The following hooks are now marked as deprecated: + +- `useDoubleClick` +- `useGeolocation` +- `useImpressionRef` +- `useIntersectionObserver` +- `useLongPress` +- `useOutsideClickEffect` +- `useStorageState` +- `useVisibilityEvent` + +These hooks will be removed in a future major version as react-simplikit is now focused on platform-independent, pure state/logic hooks. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 06c16856..c84390e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,6 +27,9 @@ jobs: cache: 'yarn' registry-url: 'https://registry.npmjs.org' + - name: Update npm for OIDC trusted publishing + run: npm install -g npm@latest + - name: Install Dependencies run: yarn install @@ -36,15 +39,20 @@ jobs: - name: Type Check run: yarn run test:type - - name: Create Release Pull Request or Publish to npm + - name: Create Release Pull Request + id: changesets uses: changesets/action@v1 with: title: 'chore: version packages' commit: 'chore: version packages' version: yarn run changeset:version - publish: yarn run changeset:publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish to npm + if: steps.changesets.outputs.hasChangesets == 'false' + run: yarn run changeset:publish + env: NPM_CONFIG_PROVENANCE: true get-diffs: diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index f5b83321..d282f411 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,24 +1,5 @@ # react-simplikit -## 0.0.47 - -### Patch Changes - -- [#302](https://github.com/toss/react-simplikit/pull/302) [`9a73aa0`](https://github.com/toss/react-simplikit/commit/9a73aa038f364c8a3733f147142946f0e2ee8a30) Thanks [@kimyouknow](https://github.com/kimyouknow)! - Deprecate hooks that depend on browser-specific APIs - - The following hooks are now marked as deprecated: - - - `useDoubleClick` - - `useGeolocation` - - `useImpressionRef` - - `useIntersectionObserver` - - `useLongPress` - - `useOutsideClickEffect` - - `useStorageState` - - `useVisibilityEvent` - - These hooks will be removed in a future major version as react-simplikit is now focused on platform-independent, pure state/logic hooks. - ## 0.0.46 ### Patch Changes