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

chore!: upgrade to node 20x #21

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gh-packages-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/setup-node@v2
with:
cache: 'npm'
node-version: '14'
node-version-file: .tool-versions
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file
scope: '@stordco'
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@ on: [push]
jobs:
build:
name: Build and lint on Node ${{ matrix.node }} and ${{ matrix.os }}

runs-on: ubuntu-latest
strategy:
matrix:
node: ['12.x', '14.x']

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
node-version-file: .tool-versions

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 20.10.0
4 changes: 2 additions & 2 deletions example/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { MSWToolbar } from '../.';
import { Button, ChakraProvider, HStack } from '@chakra-ui/react';
import type { SetupWorkerApi } from 'msw';
import type { SetupWorker } from 'msw/browser';
import { APP_NAME } from './constants';

const isDev = process.env.NODE_ENV === 'development';

let worker: SetupWorkerApi;
let worker: SetupWorker;

// An example of deferring app mounting until the worker has been loaded in development only
const prepareWorker = async () => {
Expand Down
7 changes: 3 additions & 4 deletions example/mocks/browser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { rest, setupWorker } from 'msw';
import { setupWorker } from 'msw/browser';
import {http, HttpResponse} from 'msw';
import { createUtils } from '../../';
import { APP_NAME } from '../constants';

Expand All @@ -7,9 +8,7 @@ const { json } = createUtils(APP_NAME);
export const getWorker = () => {
return setupWorker(
...[
rest.get('http://www.example.com', (_req, res, ctx) => {
return json(res, ctx, { okay: 'there' });
}),
http.get('http://www.example.com', () => HttpResponse.json({ okay: 'there' })),
]
);
};
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@types/react": "^16.9.11",
"@types/react-dom": "^16.8.4",
"copyfiles": "^2.4.1",
"msw": "^0.35.0",
"msw": "^2.0.11",
"parcel": "^1.12.3",
"prettier": "^2.4.1",
"typescript": "^3.4.5"
Expand Down
Loading
Loading