Skip to content

Commit

Permalink
chore: v1.8.0 (#29)
Browse files Browse the repository at this point in the history
* chore: update project dev dependencies

Signed-off-by: Raí Siqueira <[email protected]>

* chore(lib): fixed esm warning

Signed-off-by: Raí Siqueira <[email protected]>

* chore(project): added ts-node again

Signed-off-by: Raí Siqueira <[email protected]>

* feat(lib): add support to NextJS 13

Signed-off-by: Raí Siqueira <[email protected]>

* chore: fixed the storybook

Signed-off-by: Raí Siqueira <[email protected]>

* ci: improvements on GH CI

Signed-off-by: Raí Siqueira <[email protected]>

* chore: fix pnpm workspace

Signed-off-by: Raí Siqueira <[email protected]>

* ci: new action to the size

* ci: fix build command on size action

* ci: size action without cache

* ci: size action without cache

* docs: update readme

* docs: update readme

* test: replace Jest with Vitest

Signed-off-by: Raí Siqueira <[email protected]>

* test: add coverage reporter

Signed-off-by: Raí Siqueira <[email protected]>

* docs: update nextra and components example

* docs: update legacy options

* chore: update types

Signed-off-by: Raí Siqueira <[email protected]>

* chore(lib): bump version

---------

Signed-off-by: Raí Siqueira <[email protected]>
  • Loading branch information
raisiqueira committed Mar 27, 2023
1 parent eb5c496 commit 2750ad4
Show file tree
Hide file tree
Showing 50 changed files with 5,735 additions and 18,459 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
40 changes: 28 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: CI
on: [push]

# cancel in-progress runs on new commits to same PR (gitub.event.number)
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

jobs:
build:
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
Expand All @@ -12,26 +18,36 @@ jobs:

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

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
- name: Install PNPM
uses: pnpm/[email protected]
with:
node-version: ${{ matrix.node }}
version: 7

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
- run: pnpm install --frozen-lockfile

- name: Cache node_modules
uses: actions/cache@v3
id: pnpm-cache
with:
useLockFile: false
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install PNPM
run: npm i -g pnpm
- name: Setup Node and install project dependencies
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: 'pnpm'

- name: Lint
run: npm run nx run headless-stepper:lint
run: pnpm run nx run headless-stepper:lint

- name: Test
run: npm run nx run headless-stepper:test
run: pnpm run nx run headless-stepper:test

- name: Build
run: pnpm run build:lib
run: pnpm run build:all
41 changes: 20 additions & 21 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Coverage"
name: 'Coverage'
on:
pull_request:
branches:
Expand All @@ -7,41 +7,40 @@ on:
jobs:
coverage:
runs-on: ubuntu-22.04

strategy:
matrix:
node: ['16.x']
os: [ubuntu-latest]
env:
CI_JOB_NUMBER: 1

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

- name: Set Up Node ${{ matrix.node }}
uses: actions/setup-node@v3
- name: Install PNPM
uses: pnpm/[email protected]
with:
node-version: ${{ matrix.node }}
version: 7

- name: Cache npm
uses: actions/cache@v3
with:
path: ~/.npm
key: npm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: npm-
- run: pnpm install --frozen-lockfile

- name: Cache node_modules
uses: actions/cache@v3
id: cache-node-modules
id: pnpm-cache
with:
path: |
node_modules
packages/*/node_modules
key: modules-${{ hashFiles('pnpm-lock.yaml') }}

- name: Install PNPM
run: npm i -g pnpm
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: pnpm i
- name: Setup Node and install project dependencies
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: 'pnpm'

- name: Jest coverage report
uses: ArtiomTr/jest-coverage-report-action@v2
Expand Down
35 changes: 12 additions & 23 deletions .github/workflows/size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,22 @@ jobs:
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v3
- name: Checkout repo
uses: actions/checkout@v3

- name: Set Up Node ${{ matrix.node }}
uses: actions/setup-node@v3
- name: Install PNPM
uses: pnpm/[email protected]
with:
node-version: ${{ matrix.node }}
version: 7

- name: Cache npm
uses: actions/cache@v3
with:
path: ~/.npm
key: npm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: npm-
- run: pnpm install --frozen-lockfile

- name: Cache node_modules
uses: actions/cache@v3
id: cache-node-modules
- name: Setup Node and install project dependencies
uses: actions/setup-node@v3
with:
path: |
node_modules
packages/*/node_modules
key: modules-${{ hashFiles('pnpm-lock.yaml') }}

- name: Install PNPM
run: npm i -g pnpm
node-version: ${{ matrix.node }}

- uses: andresz1/size-limit-action@v1
- uses: preactjs/compressed-size-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
build_script: "build:lib"
repo-token: ${{ secrets.GITHUB_TOKEN }}
build-script: 'build:lib'
2 changes: 0 additions & 2 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
module.exports = {
stories: [],
addons: ['@storybook/addon-essentials'],
core: {
disableTelemetry: true,
},
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The headless-stepper library provide two ways to build your stepper component:
To use the `Stepper` and `Step` components, you need to import the `Stepper` and `Step` components from the `headless-stepper` library.

```tsx
import { Stepper, Step } from 'headless-stepper';
import { Stepper, Step } from 'headless-stepper/components';

const MyAwesomeStepper = () => {
return (
Expand Down
1 change: 1 addition & 0 deletions docs/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
4 changes: 1 addition & 3 deletions docs/components/Container/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react';
type Props = {
children: React.ReactNode;
};
type Props = React.PropsWithChildren<any>;

export default function Container({ children }: Props) {
return <div className="mx-auto max-w-7xl sm:px-6 lg:px-8">{children}</div>;
Expand Down
4 changes: 1 addition & 3 deletions docs/components/Features/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ const Features = () => {
/>
</div>
<div>
<div className="my-0 font-medium dark:text-white">
{feat?.name}
</div>
<div className="my-0 font-medium">{feat?.name}</div>
</div>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/components/examples/StepperBasic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '@codesandbox/sandpack-react/dist/index.css';

const Sandbox = () => {
const code = `
import { Stepper, Step } from 'headless-stepper';
import { Stepper, Step } from 'headless-stepper/components';
const MyAwesomeStepper = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion docs/components/examples/StepperWithAsProps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '@codesandbox/sandpack-react/dist/index.css';

const Sandbox = () => {
const code = `
import { Stepper, Step } from 'headless-stepper';
import { Stepper, Step } from 'headless-stepper/components';
import { MantineProvider, Button, Group, Container, Box } from "@mantine/core";
const MyAwesomeStepper = () => {
Expand Down
28 changes: 0 additions & 28 deletions docs/nextSeo.config.js

This file was deleted.

0 comments on commit 2750ad4

Please sign in to comment.