Skip to content

Commit

Permalink
chore: run CI tests on Node 20 (#9706)
Browse files Browse the repository at this point in the history
Co-authored-by: gtmnayan <gtmnayan@gmail.com>
  • Loading branch information
benmccann and gtm-nayan committed May 5, 2023
1 parent 39cbb58 commit a1fe0bf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: pnpm/action-setup@v2.2.4
- uses: actions/setup-node@v3
with:
node-version: '16.x'
node-version: '20.x'
cache: pnpm
- run: pnpm install --frozen-lockfile
# check prod dependencies as these would affect users
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
- node-version: 18
os: ubuntu-latest
e2e-browser: 'chromium'
- node-version: 20
os: ubuntu-latest
e2e-browser: 'chromium'
env:
KIT_E2E_BROWSER: ${{matrix.e2e-browser}}
steps:
Expand Down
14 changes: 9 additions & 5 deletions packages/kit/src/utils/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,15 @@ export function decode_uri(uri) {
/**
* URL properties that could change during the lifetime of the page,
* which excludes things like `origin`
* @type {Array<keyof URL>}
*/
const tracked_url_properties = ['href', 'pathname', 'search', 'searchParams', 'toString', 'toJSON'];
const tracked_url_properties = /** @type {const} */ ([
'href',
'pathname',
'search',
'searchParams',
'toString',
'toJSON'
]);

/**
* @param {URL} url
Expand All @@ -105,12 +111,10 @@ export function make_trackable(url, callback) {
const tracked = new URL(url);

for (const property of tracked_url_properties) {
let value = tracked[property];

Object.defineProperty(tracked, property, {
get() {
callback();
return value;
return url[property];
},

enumerable: true,
Expand Down

0 comments on commit a1fe0bf

Please sign in to comment.