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

Breaking: Integrate with window.history, add setter method on window.location, improve tests and other project meta #179

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
88 changes: 32 additions & 56 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,70 +8,46 @@ jobs:
env:
CI: true
steps:
- uses: actions/checkout@v2
- name: Use Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 18.x
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm

# From: https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm ci

- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint

- name: Lint
run: npm run lint
- name: Test
run: npm test

- name: Test
run: npm test

- name: Build
run: npm run build
- name: Build
run: npm run build

release:
needs: testing
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v2
- name: Use Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 18.x

# From: https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: Install Dependencies
run: npm ci

- name: Build
run: npm run build

- name: Release
run: npx semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm

- name: Install Dependencies
run: npm ci

- name: Build
run: npm run build

- name: Release
run: npx semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## v3.0.0-alpha.1

**[`v2.0.0...v3.0.0-alpha.1`](https://github.com/evelynhathaway/jest-location-mock/compare/v2.0.0...v3.0.0-alpha.1)** - **2023-10-20**

### 💥 Breaking

- Add setter method on window.location [`4be68a0`](https://github.com/evelynhathaway/jest-location-mock/commit/4be68a0)
- Add spies and proxy for window.history to track its updates to the original window.location [`628a60d`](https://github.com/evelynhathaway/jest-location-mock/commit/628a60d)

### 📄 Documentation

- Add limitations, new features, alternative setup and configuration methods to readme [`51a65bf`](https://github.com/evelynhathaway/jest-location-mock/commit/51a65bf)
- Fix comma typos in readme [`8f9af49`](https://github.com/evelynhathaway/jest-location-mock/commit/8f9af49)

### 📦 Package

- **npm:** Bump jest-diff from 29.6.4 to 29.7.0 [`d592844`](https://github.com/evelynhathaway/jest-location-mock/commit/d592844)
- **npm:** npm update deep [`26652b8`](https://github.com/evelynhathaway/jest-location-mock/commit/26652b8)

### 🧹 Internal

- Downgrade semantic-release [`774ada3`](https://github.com/evelynhathaway/jest-location-mock/commit/774ada3)
- Improve tests for existing logic [`8ef5de8`](https://github.com/evelynhathaway/jest-location-mock/commit/8ef5de8)
- Remove extraneous eslint disables [`e3401af`](https://github.com/evelynhathaway/jest-location-mock/commit/e3401af)
- Simplify GitHub Actions npm cache [`0a0441c`](https://github.com/evelynhathaway/jest-location-mock/commit/0a0441c)
- Update GitHub Actions [`ed50b4d`](https://github.com/evelynhathaway/jest-location-mock/commit/ed50b4d)

## v2.0.0

**[`v1.0.10...v2.0.0`](https://github.com/evelynhathaway/jest-location-mock/compare/v1.0.10...v2.0.0)** - **2023-09-04**
Expand Down
Loading