Skip to content
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
File renamed without changes.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

7 changes: 0 additions & 7 deletions .eslintrc.js

This file was deleted.

12 changes: 3 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,13 @@ jobs:

steps:
- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v5
with:
node-version: '16.20'
node-version: '24'
registry-url: 'https://registry.npmjs.com'

- name: Checkout code
uses: actions/checkout@v2

- name: Get version from tag
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
shell: bash
uses: actions/checkout@v5

- name: Install module dependencies
run: yarn
Expand Down
27 changes: 12 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,34 @@ name: Create release
on:
push:
tags:
- 'v*'
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write

steps:
- name: Get version from tag
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
shell: bash
run: echo "current_version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v5

- name: Get changelog entries
id: changelog_reader
uses: mindsers/changelog-reader-action@v1
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md

- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ steps.changelog_reader.outputs.log_entry }}
draft: false
prerelease: false
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
body: ${{ steps.changelog_reader.outputs.changes }}
token: ${{ secrets.WORKFLOW_TOKEN }}
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v5
with:
node-version: '16.20'
node-version: '24'

- name: Setup module dependencies cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -44,6 +44,6 @@ jobs:
run: yarn build

- name: Lint commits
uses: wagoid/commitlint-github-action@v5
with:
configFile: .commitlintrc.js
uses: wagoid/commitlint-github-action@v6
with:
configFile: .commitlintrc.cjs
5 changes: 1 addition & 4 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit
npx --no -- commitlint --edit "$1"
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged && npx validate-branch-name
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## [v2.0.0](https://github.com/untile/react-core/releases/tag/v2.0.0) (2023-08-04)

- Remove dom props from Svg component [\#36](https://github.com/untile/react-core/pull/36) ([rafaelcruzazevedo](https://github.com/rafaelcruzazevedo))
- Bump semver from 5.7.1 to 5.7.2 [\#31](https://github.com/untile/react-core/pull/31) ([dependabot](https://github.com/apps/dependabot))
- Bump tough-cookie from 4.1.2 to 4.1.3 [\#30](https://github.com/untile/react-core/pull/30) ([dependabot](https://github.com/apps/dependabot))
Expand All @@ -10,6 +11,7 @@
- Update @untile/stylelint-config-react to v1.0.2 [\#26](https://github.com/untile/react-core/pull/26) ([flaviocastro](https://github.com/flaviocastro))

## [v1.0.0](https://github.com/untile/react-core/releases/tag/v1.0.0) (2023-04-12)

- Fix NPM publish action wrong registry [\#24](https://github.com/untile/react-core/pull/24) ([flaviocastro](https://github.com/flaviocastro))
- Update Untile dependencies to latest releases [\#23](https://github.com/untile/react-core/pull/23) ([flaviocastro](https://github.com/flaviocastro))
- Add vitest for full test suite instead of jest [\#21](https://github.com/untile/react-core/pull/21) ([rafaelcruzazevedo](https://github.com/rafaelcruzazevedo))
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ yarn add @untile/react-core

### Requirements

- Node.js >= 16
- Node.js >= 20
- NPM >= please-use-yarn
- Yarn >= 1.22.0

Expand Down
15 changes: 6 additions & 9 deletions bin/build-package-json.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#!/usr/bin/env node
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-sync */

/**
* Module dependencies.
*/
Expand Down Expand Up @@ -52,7 +48,8 @@ fs.readFile('package.json', (error, content) => {
...acc,
[`./${name}`]: {
import: `./dist/esm/${name}/index.js`,
require: `./dist/cjs/${name}/index.js`
require: `./dist/cjs/${name}/index.js`,
types: `./dist/types/${name}/index.d.ts`
}
}),
{}
Expand All @@ -67,13 +64,13 @@ fs.readFile('package.json', (error, content) => {
)
}
},
undefined,
null,
2
);

fs.writeFile('package.json', data, error => {
if (error) {
throw error;
fs.writeFile('package.json', data, writeError => {
if (writeError) {
throw writeError;
}
});
});
2 changes: 1 addition & 1 deletion bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ NC='\033[0m' # No Color
# Generate esm modules.
echo "📦 Generating esm modules..."
tsc --project tsconfig.build.json --declaration false --module esnext --target es6 --outDir dist/esm
resolve-tspaths --project tsconfig.build.json --out dist/ems
resolve-tspaths --project tsconfig.build.json --out dist/esm

# Generate types.
echo "📦 Generating types..."
Expand Down
72 changes: 34 additions & 38 deletions docs/components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,47 @@ web applications based on react.
<details>
<summary><h3>RawHtml</h3></summary>

#### Type
#### Type

```tsx
interface RawHtmlProps {
children: ReactNode;
className?: string;
element?: string;
}
```
```tsx
interface RawHtmlProps {
children: ReactNode;
className?: string;
element?: string;
}
```

#### Usage
#### Usage

```jsx
import { RawHtml } from '@untile/react-core/components/raw-html';
```jsx
import { RawHtml } from '@untile/react-core/components/raw-html';

<RawHtml element={'div'}>{`foo<br>bar`}</RawHtml>;
```

<RawHtml element={'div'}>
{`foo<br>bar`}
</RawHtml>
```
</details>

<details>
<summary><h3>Svg</h3></summary>

#### Type

```tsx
interface SvgProps {
className?: string;
color?: string;
icon: string;
size: string | unknown;
}
```

#### Usage

```jsx
import { Svg } from '@untile/react-core/components/svg';
import svgIcon from './foo/bar.svg';

<Svg
color={'red'}
icon={svgIcon}
size={'20px'}
/>
```
#### Type

```tsx
interface SvgProps {
className?: string;
color?: string;
icon: string;
size: string | unknown;
}
```

#### Usage

```jsx
import { Svg } from '@untile/react-core/components/svg';
import svgIcon from './foo/bar.svg';

<Svg color={'red'} icon={svgIcon} size={'20px'} />;
```

</details>
Loading
Loading