Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Commit

Permalink
Fix broken installation (#747)
Browse files Browse the repository at this point in the history
* fix #723

* update CI jobs
  • Loading branch information
morewings authored Dec 26, 2022
1 parent 77a7a0d commit 9208777
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 33 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/merge-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v1
- name: Cancel Previous Runs
uses: styfle/[email protected]
- uses: actions/checkout@v3
- name: Cancel Workflow Action
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Use Node.js ${{ steps.nvm.outputs.NVMRC }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}
cache: 'yarn'
- name: Run yarn tasks
run: |
yarn --silent
yarn install --frozen-lockfile
- name: Publish NPM package
uses: JS-DevTools/npm-publish@v1
with:
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/pull-request-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
name: Node.js CI

on:
# push:
# branches: [ master ]
pull_request:
branches: [ master ]

Expand All @@ -13,22 +15,22 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v1
- name: Cancel Previous Runs
uses: styfle/[email protected]
- uses: actions/checkout@v3
- name: Cancel Workflow Action
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Use Node.js ${{ steps.nvm.outputs.NVMRC }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}
cache: 'yarn'
- name: Run yarn tasks
run: |
yarn --silent
yarn install --frozen-lockfile
yarn lint:js --quiet
yarn lint:style --quiet
yarn test --silent
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"@storybook/react": "6.5.13",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "13.4.0",
"@testing-library/react-hooks": "8.0.1",
"@testing-library/user-event": "14.4.3",
"autoprefixer": "9.8.8",
"babel-eslint": "10.1.0",
Expand Down
7 changes: 3 additions & 4 deletions src/lib/Counter/useLogic.spec.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {renderHook, act} from '@testing-library/react-hooks';
import {renderHook, act} from '@testing-library/react';
import useLogic from './useLogic';

describe('lib > Counter > useLogic', () => {
const initialValue = 0;
it('renders', () => {
/**
* Render hook, using testing-library utility
* @see https://react-hooks-testing-library.com/reference/api#renderhook
* @see https://testing-library.com/docs/react-testing-library/api#renderhook
*/
const {result} = renderHook(() => useLogic(initialValue));

Expand All @@ -15,13 +15,12 @@ describe('lib > Counter > useLogic', () => {
it('increments value', () => {
/**
* Render hook, using testing-library utility
* @see https://react-hooks-testing-library.com/reference/api#renderhook
* @see https://testing-library.com/docs/react-testing-library/api#renderhook
*/
const {result} = renderHook(() => useLogic(initialValue));

/**
* Wrap state update with act
* @see https://react-hooks-testing-library.com/usage/basic-hooks#updates
* @see https://fb.me/react-wrap-tests-with-act
*/
act(() => {
Expand Down
2 changes: 1 addition & 1 deletion writeTemplateConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const template = {
style: 'lib/default.css',
files: ['lib'],
engines: {
node: '>=10',
node: '>=14',
},
private: false,
scripts: {
Expand Down
15 changes: 0 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3129,14 +3129,6 @@
lodash "^4.17.15"
redent "^3.0.0"

"@testing-library/[email protected]":
version "8.0.1"
resolved "https://registry.yarnpkg.com/@testing-library/react-hooks/-/react-hooks-8.0.1.tgz#0924bbd5b55e0c0c0502d1754657ada66947ca12"
integrity sha512-Aqhl2IVmLt8IovEVarNDFuJDVWVvhnr9/GCU6UUnrYXwgDFF9h2L2o2P9KBni1AST5sT6riAyoukFLyjQUgD/g==
dependencies:
"@babel/runtime" "^7.12.5"
react-error-boundary "^3.1.0"

"@testing-library/[email protected]":
version "13.4.0"
resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-13.4.0.tgz#6a31e3bf5951615593ad984e96b9e5e2d9380966"
Expand Down Expand Up @@ -13666,13 +13658,6 @@ react-element-to-jsx-string@^14.3.4:
is-plain-object "5.0.0"
react-is "17.0.2"

react-error-boundary@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/react-error-boundary/-/react-error-boundary-3.1.0.tgz#9487443df2f9ba1db90d8ab52351814907ea4af3"
integrity sha512-lmPrdi5SLRJR+AeJkqdkGlW/CRkAUvZnETahK58J4xb5wpbfDngasEGu+w0T1iXEhVrYBJZeW+c4V1hILCnMWQ==
dependencies:
"@babel/runtime" "^7.12.5"

react-error-overlay@^6.0.11:
version "6.0.11"
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz#92835de5841c5cf08ba00ddd2d677b6d17ff9adb"
Expand Down

0 comments on commit 9208777

Please sign in to comment.