From fbe6ed06f6c2594a9d748b955aaddb3c738792e2 Mon Sep 17 00:00:00 2001 From: ZanzyTHEbar Date: Sat, 20 May 2023 12:03:45 +0000 Subject: [PATCH 1/8] Format --- dev/App.tsx | 29 +++++++++++++++++++---------- dev/pages/DefaultChart.tsx | 4 +--- dev/styles/App.module.css | 2 +- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/dev/App.tsx b/dev/App.tsx index c75a7e2..d005a3c 100644 --- a/dev/App.tsx +++ b/dev/App.tsx @@ -8,12 +8,8 @@ import type { Component } from 'solid-js' type DemoPage = 'DefaultChart.tsx' | 'TypedChart.tsx' | 'Registerables.tsx' const App: Component = () => { - const demoPages: DemoPage[] = [ - 'DefaultChart.tsx', - 'TypedChart.tsx', - 'Registerables.tsx' - ] - + const demoPages: DemoPage[] = ['DefaultChart.tsx', 'TypedChart.tsx', 'Registerables.tsx'] + const [demoPage, setDemoPage] = createSignal(demoPages[0]) const onDemoPageSelect = (event: any) => { @@ -23,7 +19,11 @@ const App: Component = () => { return ( <>
- {(page) => ( -

or view source

+

+ or{' '} + + view source + +

- + @@ -45,7 +55,6 @@ const App: Component = () => { - ) } diff --git a/dev/pages/DefaultChart.tsx b/dev/pages/DefaultChart.tsx index cf41f72..13a369a 100644 --- a/dev/pages/DefaultChart.tsx +++ b/dev/pages/DefaultChart.tsx @@ -24,9 +24,7 @@ const DefaultChartPage: Component = () => { 'pie', 'scatter', ] - const [chartType, setChartType] = createSignal( - chartTypes[0], - ) + const [chartType, setChartType] = createSignal(chartTypes[0]) const onRandomizeClick = () => { setChartData((prev) => generateRandomChartData(prev.datasets.length)) diff --git a/dev/styles/App.module.css b/dev/styles/App.module.css index a2288ce..59db7c7 100644 --- a/dev/styles/App.module.css +++ b/dev/styles/App.module.css @@ -129,4 +129,4 @@ button:hover { .link:hover, .link:focus { color: #183a5c; -} \ No newline at end of file +} From bb09baac30093774b4e9581f0f9d3dd39ba69a96 Mon Sep 17 00:00:00 2001 From: ZanzyTHEbar Date: Sat, 20 May 2023 14:00:55 +0100 Subject: [PATCH 2/8] ci(ci-semver): setup automating semantic versioning - setup gh action to build, version, and release production files - setup semantic release to use commit messages and history to do versioning - setup changelog generation - setup, but not enable, automated publishing to npm - setup readme on how to use semantic-release commit messages - setup contribution guildelines --- .github/workflows/format.yml | 2 +- .github/workflows/release.yml | 102 ++++++++++++++++++ .github/workflows/tests.yml | 39 ------- .releaserc | 194 ++++++++++++++++++++++++++++++++++ .vscode/settings.json | 8 +- README.md | 35 ++++-- dev/App.tsx | 29 ++--- dev/pages/DefaultChart.tsx | 4 +- dev/styles/App.module.css | 2 +- docs/CONTRIBUTION.md | 110 +++++++++++++++++++ docs/STANDARDS.md | 88 +++++++++++++++ scripts/prepareCMD.sh | 58 ++++++++++ solid-chartjs.code-workspace | 2 +- 13 files changed, 597 insertions(+), 76 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/tests.yml create mode 100644 .releaserc create mode 100644 docs/CONTRIBUTION.md create mode 100644 docs/STANDARDS.md create mode 100644 scripts/prepareCMD.sh diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 3304bfa..381a09d 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -26,4 +26,4 @@ jobs: - name: Add, Commit and Push uses: stefanzweifel/git-auto-commit-action@v4 with: - commit_message: 'Format' + commit_message: 'refactor: Format' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..743126f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,102 @@ +name: Release Library +on: + workflow_dispatch: + push: + tags: + - "v*" + branches: + - main + - master + - develop + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + with: + fetch-depth: 2 + + - uses: pnpm/action-setup@v2.2.4 + + - name: Setup Node.js environment + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: pnpm + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm build + + #- name: Test + # run: pnpm run test + # env: + # CI: true + + - name: Archive the build + uses: actions/upload-artifact@v3 + with: + name: production-files + path: dist + retention-days: 5 + if-no-files-found: error + deploy: + runs-on: ubuntu-latest + name: Deploy + needs: [build] + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Create Directory + run: mkdir -p dist + - name: Download artifact + uses: actions/download-artifact@v2 + with: + name: production-files + path: ./dist + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 18 + - run: npm install -g conventional-changelog-conventionalcommits + - run: npm install -g semantic-release@v21.0.2 + - run: npm install -g @semantic-release/exec + - run: npm install -g @semantic-release/npm + - run: npm install -g @semantic-release/git + - run: npm install -g @semantic-release/release-notes-generator + - run: npm install -g @semantic-release/changelog + - run: npm install -g @semantic-release/github + - name: Release + env: + GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }} + run: | + sudo apt-get install -y jq + chmod +x ./scripts/prepareCMD.sh + semantic-release + + cleanup: + name: Cleanup actions + needs: + - deploy + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: "♻️ remove build artifacts" + uses: geekyeggo/delete-artifact@v1 + with: + name: production-files diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index b3703ab..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Build and Test - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: pnpm/action-setup@v2.2.4 - - - name: Setup Node.js environment - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: pnpm - - - name: Install dependencies - run: pnpm install - - - name: Build - run: pnpm run build - - - name: Test - run: pnpm run test - env: - CI: true - - #3- name: Typecheck - #3 run: pnpm run typecheck diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..354ac98 --- /dev/null +++ b/.releaserc @@ -0,0 +1,194 @@ +{ + "branches": [ + "main", + "master", + "release", + { + "name": "develop", + "prerelease": true + } + ], + "plugins": [ + [ + "@semantic-release/commit-analyzer", + { + "preset": "conventionalcommits", + "parserOpts": { + "noteKeywords": [ + "BREAKING CHANGE", + "BREAKING CHANGES", + "BREAKING" + ] + }, + "releaseRules": [ + { + "breaking": true, + "release": "major" + }, + { + "type": "feat", + "release": "minor" + }, + { + "type": "fix", + "release": "patch" + }, + { + "type": "perf", + "release": "patch" + }, + { + "type": "revert", + "release": "patch" + }, + { + "type": "docs", + "scope": "docs-*", + "release": "minor" + }, + { + "type": "docs", + "release": false + }, + { + "type": "style", + "release": "patch" + }, + { + "type": "refactor", + "release": "patch" + }, + { + "type": "test", + "release": "patch" + }, + { + "type": "build", + "release": "patch" + }, + { + "type": "ci", + "scope": "ci-*", + "release": "patch" + }, + { + "type": "chore", + "release": false + }, + { + "type": "no-release", + "release": false + } + ] + } + ], + [ + "@semantic-release/release-notes-generator", + { + "preset": "conventionalcommits", + "parserOpts": { + "noteKeywords": [ + "BREAKING CHANGE", + "BREAKING CHANGES", + "BREAKING" + ] + }, + "writerOpts": { + "commitsSort": [ + "subject", + "scope" + ] + }, + "presetConfig": { + "types": [ + { + "type": "feat", + "section": "πŸ• Features" + }, + { + "type": "feature", + "section": "πŸ• Features" + }, + { + "type": "fix", + "section": "πŸ› Bug Fixes" + }, + { + "type": "perf", + "section": "πŸ”₯ Performance Improvements" + }, + { + "type": "revert", + "section": "⏩ Reverts" + }, + { + "type": "docs", + "section": "πŸ“ Documentation" + }, + { + "type": "style", + "section": "🎨 Styles" + }, + { + "type": "refactor", + "section": "πŸ§‘β€πŸ’» Code Refactoring" + }, + { + "type": "test", + "section": "βœ… Tests" + }, + { + "type": "build", + "section": "πŸ€– Build System" + }, + { + "type": "ci", + "section": "πŸ” Continuous Integration" + } + ] + } + } + ], + [ + "@semantic-release/changelog", + { + "changelogTitle": "# πŸ“¦ Changelog \n[![conventional commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![semantic versioning](https://img.shields.io/badge/semantic%20versioning-2.0.0-green.svg)](https://semver.org)\n> All notable changes to this project will be documented in this file" + } + ], + [ + "@semantic-release/exec", + { + "prepareCmd": "./scripts/prepareCMD.sh ${nextRelease.version}", + "publishCmd": "echo Publishing ${nextRelease.version}" + } + ], + [ + "@semantic-release/npm", + { + "npmPublish": false + } + ], + [ + "@semantic-release/github", + { + "assets": [ + { + "path": "dist/*.tar.gz", + "label": "Distribution" + } + ] + } + ], + [ + "@semantic-release/git", + { + "assets": [ + "package.json", + "LICENSE*", + "CHANGELOG.md" + ], + "message": "chore(${nextRelease.type}): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" + } + ] + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 1d9ad99..0f2257f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,3 @@ { - "cSpell.words": [ - "chartjs", - "minifaker", - "solidjs", - "tsup", - "typecheck" - ] + "cSpell.words": ["chartjs", "minifaker", "solidjs", "Triaging", "tsup", "typecheck"] } diff --git a/README.md b/README.md index 412865a..337e7b8 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,15 @@ The `solid-chartjs` library is a SolidJS wrapper around the [`Chart.js`](https://www.chartjs.org) library, allowing you to easily create interactive charts in your SolidJS applications. -- [Quick start](#quick-start) -- [Chart Props](#chart-props) -- [Examples](#examples) -- [Credits](#credits) +- [solid-chartjs](#solid-chartjs) + - [Quick start](#quick-start) + - [Chart Props](#chart-props) + - [Examples](#examples) + - [Credits](#credits) + - [Contributing](#contributing) + - [Contribution Guidelines](#contribution-guidelines) + - [Code and Commit Standards](#code-and-commit-standards) + - [License](#license) ## Quick start @@ -132,6 +137,22 @@ const fallback = () => { ## Credits -- This library is _heavily_ inspired by [react-chartjs-2](https://react-chartjs-2.js.org/) -- Awesome charting library [Chart.js](https://www.chartjs.org) -- Flexible library for building user interfaces [SolidJs](https://www.solidjs.com/) +- This library is _heavily_ inspired by [react-chartjs-2](https://react-chartjs-2.js.org/) +- Awesome charting library [Chart.js](https://www.chartjs.org) +- Flexible library for building user interfaces [SolidJs](https://www.solidjs.com/) + +## Contributing + +### Contribution Guidelines + +Please read our [Contribution Guidelines](/docs/CONTRIBUTION.md) before you contribute. + +## Code and Commit Standards + +Please read and follow the [standards for this repo](/docs/STANDARDS.md) + +These standards are laid out to ensure that the code base is as maintainable as possible. + +## License + +[MIT](/LICENSE) diff --git a/dev/App.tsx b/dev/App.tsx index d005a3c..c75a7e2 100644 --- a/dev/App.tsx +++ b/dev/App.tsx @@ -8,8 +8,12 @@ import type { Component } from 'solid-js' type DemoPage = 'DefaultChart.tsx' | 'TypedChart.tsx' | 'Registerables.tsx' const App: Component = () => { - const demoPages: DemoPage[] = ['DefaultChart.tsx', 'TypedChart.tsx', 'Registerables.tsx'] - + const demoPages: DemoPage[] = [ + 'DefaultChart.tsx', + 'TypedChart.tsx', + 'Registerables.tsx' + ] + const [demoPage, setDemoPage] = createSignal(demoPages[0]) const onDemoPageSelect = (event: any) => { @@ -19,11 +23,7 @@ const App: Component = () => { return ( <>
- {(page) => ( -

- or{' '} - - view source - -

+

or view source

- + @@ -55,6 +45,7 @@ const App: Component = () => { + ) } diff --git a/dev/pages/DefaultChart.tsx b/dev/pages/DefaultChart.tsx index 13a369a..cf41f72 100644 --- a/dev/pages/DefaultChart.tsx +++ b/dev/pages/DefaultChart.tsx @@ -24,7 +24,9 @@ const DefaultChartPage: Component = () => { 'pie', 'scatter', ] - const [chartType, setChartType] = createSignal(chartTypes[0]) + const [chartType, setChartType] = createSignal( + chartTypes[0], + ) const onRandomizeClick = () => { setChartData((prev) => generateRandomChartData(prev.datasets.length)) diff --git a/dev/styles/App.module.css b/dev/styles/App.module.css index 59db7c7..a2288ce 100644 --- a/dev/styles/App.module.css +++ b/dev/styles/App.module.css @@ -129,4 +129,4 @@ button:hover { .link:hover, .link:focus { color: #183a5c; -} +} \ No newline at end of file diff --git a/docs/CONTRIBUTION.md b/docs/CONTRIBUTION.md new file mode 100644 index 0000000..2546b88 --- /dev/null +++ b/docs/CONTRIBUTION.md @@ -0,0 +1,110 @@ +# Contributing + +**Any contribution helps our team and make Solid-ChartJS better for the entire SolidJS community!** + +Everybody is welcome and invited to contribute to the Solid-ChartJS Project by: + +* Testing newly released features and reporting issues. +* Providing Pull Requests (Features, Proof of Concepts, Language files or Fixes) +* Contributing missing documentation for features. + +This document describes rules that are in effect for this repository, meant for handling issues by contributors in the issue tracker and PRs. + +## Opening New Issues + +**Issue tracker is NOT a general discussion forum!** + +1. Opening an issue means that a problem exists in the code and should be addressed by the project contributors. +2. When opening an issue, it is required to fill out the presented template. The requested information is important! If the template is ignored or insufficient info about the issue is provided, the issue may be closed. +3. Questions of type "How do I..." or "Can you please help me with..." or "Can Solid-ChartJS do..." WILL NOT be handled here. Such questions should be directed at a discussion forum or to the SolidJS Support Chat such as the discord. All issues of this type will be closed with a simple reference to this contributing policy. +4. Issues about topics already handled in the documentation will be closed in a similar manner. +5. Issues for unmerged PRs will be closed. If there is an issue with a PR, the explanation should be added to the PR itself. +6. Issues with accompanied investigation that shows the root of the problem should be given priority. +7. Duplicate issues will be closed. + +## Triaging of Issues/PR's + +1. Any contributor to the project can participate in the triaging process, if he/she chooses to do so. +2. An issue that needs to be closed, either due to not complying with this policy, or for other reasons, should be closed by a contributor. +3. Issues that are accepted should be marked with appropriate labels. +4. Issues that could impact functionality for many users should be considered severe. +5. Issues caused by the SDK or chip should not be marked severe, as there usually isn’t much to be done. Common sense should be applied when deciding. Such issues should be documented in the Wiki, for reference by users. +6. Issues with feature requests should be discussed for viability/desirability. +7. Feature requests or changes that are meant to address a very specific/limited use case, especially if at the expense of increased code complexity, may be denied, or may be required to be redesigned, generalized, or simplified. +8. Feature requests that are not accompanied by a PR: + * could be closed immediately (denied). + * could be closed after some predetermined period of time (left as candidate for somebody to pick up). +9. In some cases, feedback may be requested from the issue reporter, either as additional info for clarification, additional testing, or other. If no feedback is provided, the issue may be closed by a contributor or after 30 days by the STALE bot. + +## Pull requests + +A Pull Request (PR) is the process where code modifications are managed in GitHub. + +The process is straight-forward. + +* Read [How to get faster PR reviews](https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#best-practices-for-faster-reviews) by Kubernetes (but skip step 0) +* Fork the Solid-ChartJS Repository [git repository](https://github.com/s0ftik3/solid-chartjs). +* Write/Change the code in your Fork for a new feature, bug fix, new sensor, optimization, etc. +* Ensure tests work. +* Create a Pull Request against the [**development**](https://github.com/s0ftik3/solid-chartjs/tree/develop) branch of Solid-ChartJS. + +1. All pull requests must be done against the development branch. +2. Only relevant files should be touched (Also beware if your editor has auto-formatting feature enabled). +3. Only one feature/fix should be added per PR. +4. If adding a new functionality (new features, new library support) not related to an existing component move it to it's own modules. +5. PRs that don't compile (fail in CI Tests) or cause coding errors will not be merged. Please fix the issue. Same goes for PRs that are raised against older commit in development - you might need to rebase and resolve conflicts. +6. All pull requests should undergo peer review by at least one contributor other than the creator, excepts for the owner. +7. All pull requests should consider updates to the documentation. +8. Pull requests that address an outstanding issue, particularly an issue deemed to be severe, should be given priority. +9. If a PR is accepted, then it should undergo review and updated based on the feedback provided, then merged. +10. By submitting a PR, it is needed to use the provided PR template and check all boxes, performing the required tasks and accepting the CLA. +11. Pull requests that don't meet the above will be denied and closed. + +-------------------------------------- + +## Contributor License Agreement (CLA) + +```txt +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the GPL-3.0 or MIT license; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the GPL-3.0 or MIT license; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it) is maintained indefinitely + and may be redistributed consistent with this project or the open + source license(s) involved. +``` + +This Contributor License Agreement (CLA) was adopted on April 1st, 2019. + +The text of this license is available under the [Creative Commons Attribution-ShareAlike 3.0 Un-ported License](http://creativecommons.org/licenses/by-sa/3.0/). It is based on the Linux [Developer Certificate Of Origin](http://elinux.org/Developer_Certificate_Of_Origin), but is modified to explicitly use the GPL-3.0 license and not mention sign-off (due to GitHub.com keeps an historical, with your user name, of PRs' commits and all editions on PR's comments). + +To accept the CLA it is required to put a x between [ ] on `[ ] I accept the CLA` in the PR template when submitting it. The [ ] is an opt-in box, so you have to manually accept it. + +**Why a CLA ?** + +_"A Contributor License Agreement (CLA) is strongly recommended when accepting third party contributions to an open development project, such as an open source software project. In order to redistribute contributions, it is necessary to ensure that the project has the necessary rights to do so. A Contributor License Agreement is a lightweight agreement, signed by the copyright holder, that grants the necessary rights for the contribution to be redistributed as part of the project."_ [OSS Watch](http://oss-watch.ac.uk/resources/cla) + +A CLA is a legal document in which you state _you are entitled to contribute the code/documentation/translation to the project_ you’re contributing to and that _you are willing to have it used in distributions and derivative works_. This means that should there be any kind of legal issue in the future as to the origins and ownership of any particular piece of code, then that project has the necessary forms on file from the contributor(s) saying they were permitted to make this contribution. + +CLA is a safety because it also ensures that once you have provided a contribution, you cannot try to withdraw permission for its use at a later date. People can therefore use that software, confident that they will not be asked to stop using pieces of the code at a later date. + +A **license** grants "outbound" rights to the user of project. + +A **CLA** enables a contributor to grant "inbound" rights to a project. + + diff --git a/docs/STANDARDS.md b/docs/STANDARDS.md new file mode 100644 index 0000000..2e192f4 --- /dev/null +++ b/docs/STANDARDS.md @@ -0,0 +1,88 @@ +

+ solid-chartjs +

+ +# Standards Guide + +Listed here are the standards that are used for the Solid-ChartJS project. These standards are used to ensure that the project is consistent and easy to understand. + +## Table of Contents + +- [Standards Guide](#standards-guide) + - [Table of Contents](#table-of-contents) + - [Code Standards](#code-standards) + - [General](#general) + - [Git Commit Style](#git-commit-style) + +## Code Standards + +### General + +It is by design that we use a light wrapper around the Chart.js library, we prefer to have no deep-linking into the Chart.js library. This is to ensure that we can easily update the Chart.js library without having to update the Solid-ChartJS library. + +We have only a few rules for the documentation site: + +- All code should be written in English. +- All code should be written in a way that is easy to understand. +- All code should be written in a way that is easy to maintain. +- All code should be written in a way that is easy to extend. +- Our git commit style is to be followed, in english only. + +### Git Commit Style + +We use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard for our git commit style. This is to ensure that our git commits are easy to understand and easy to maintain. This is also to ensure that our git commits are easy to extend. + +Git commits are used to with the [Semantic Release](https://semantic-release.gitbook.io/semantic-release/) tool to automatically generate the changelog and versioning for the project. As such, it is important that we follow the Conventional Commits standard, with our own rule customizations. + +The following is a list of the customizations that we have made to the Conventional Commits standard: + +- We use the `BREAKING CHANGE(S)` or `BREAKING` text to indicate a breaking change. + +Our git commit style is as follows: + +```bash +[(-optional scope)]: + +[optional body] + +[optional footer(s)] +``` + +The following is a list of the types that we use: + +- `feat`: A new feature. +- `fix`: A bug fix. +- `docs`: Documentation only changes. +- `style`: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc). +- `refactor`: A code change that neither fixes a bug nor adds a feature. +- `perf`: A code change that improves performance. +- `test`: Adding missing or correcting existing tests. +- `build`: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm, yarn, actions). +- `ci`: Changes to our CI configuration files and scripts (example scopes: GH-Actions, yml, YAML). +- `chore`: Other changes that don't modify src or test files. +- `revert`: Reverts a previous commit. +- `BREAKING CHANGE`: Indicate a breaking change. +- `no-release`: This commit will not trigger a release. + +An example of our git commit style is as follows: + +> **Note**: Scopes are optional, and are not required. They only need to be used when it makes sense to use them to provide more context to the commit. + +```bash +feat(feat-SomeScope): add a new feature # commit message +# empty space, this is required +- added new thing # commit details (optional but recommended if commit message is not enough) +# empty space, this is required +BREAKING CHANGE: this is a breaking change # breaking change (optional but recommended if commit breaks previous functionality) +``` + +An example of our git commit style without a scope is as follows: + +```bash +feat: add a new feature # commit message +- added new thing # commit details (optional but recommended if commit message is not enough) +# empty space, this is required +BREAKING CHANGE: this is a breaking change # breaking change (optional but recommended if commit breaks previous functionality) +``` + +[Top](#standards-guide) diff --git a/scripts/prepareCMD.sh b/scripts/prepareCMD.sh new file mode 100644 index 0000000..d019a26 --- /dev/null +++ b/scripts/prepareCMD.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +# create a vairable to hold a passed in argument +# this argument is the next release version +# this is passed in from the .releaserc file + +sudo apt-get install -y jq + +nextReleaseVersion=$1 +TARGET_KEY="version" + +# parse all letters a-z and A-Z and replace with nothing +# this will remove all letters from the version string +# this is to ensure that the version string is a valid semver + +# check if there is a letter in the version string +# if there is a letter, then remove it +# if there is no letter, then do nothing +if [[ $nextReleaseVersion =~ [a-zA-Z] ]]; then + nextReleaseVersion=$(echo $nextReleaseVersion | sed 's/[a-zA-Z]//g') + + # check if there is a dash in the version string + # if there is a dash, then replace it with a dot + # if there is no dash, then do nothing + if [[ $nextReleaseVersion =~ "-" ]]; then + # parse all dashes and replace with dots + # this is to ensure that the version string is a valid semver + nextReleaseVersion=$(echo $nextReleaseVersion | sed 's/-/./g') + + # remove everything after the third dot and the dot itself + # this is to ensure that the version string is a valid semver + nextReleaseVersion=$(echo $nextReleaseVersion | sed 's/\.[0-9]*$//g') + # remove the last dot + nextReleaseVersion=$(echo $nextReleaseVersion | sed 's/\.$//g') + fi +fi + +# print the next release version + +printf "[prepareCMD.sh]: Next version: ${nextReleaseVersion}\n" + +# This script is used to execute the prepareCMD.sh script on the remote host +printf "[prepareCMD.sh]: Executing prepareCMD.sh on remote host \n" + +printf "[prepareCMD.sh]: Updating the version in the package.json file \n" + +# make a temp file +tmp=$(mktemp) + +jq --arg a "$nextReleaseVersion" '.version = $a' ./package.json > "$tmp" && mv "$tmp" ./package.json -f + +# Tar zip the entire project + +printf "[prepareCMD.sh]: Zipping the project \n" + +tar -czvf solid-chartjs.tar.gz ./dist + +printf "[prepareCMD.sh]: Done, continuing with release. \n" \ No newline at end of file diff --git a/solid-chartjs.code-workspace b/solid-chartjs.code-workspace index c8ed9fa..e199b93 100644 --- a/solid-chartjs.code-workspace +++ b/solid-chartjs.code-workspace @@ -29,6 +29,6 @@ "[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "cSpell.words": ["minifaker", "registerables"] + "cSpell.words": ["minifaker", "registerables", "Triaging"] } } From 2231e9c47c65c3eaff54a72bb1b66055bc01e37e Mon Sep 17 00:00:00 2001 From: ZanzyTHEbar Date: Sat, 20 May 2023 13:01:46 +0000 Subject: [PATCH 3/8] refactor: Format --- dev/App.tsx | 29 +++++++++++++++++++---------- dev/pages/DefaultChart.tsx | 4 +--- dev/styles/App.module.css | 2 +- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/dev/App.tsx b/dev/App.tsx index c75a7e2..d005a3c 100644 --- a/dev/App.tsx +++ b/dev/App.tsx @@ -8,12 +8,8 @@ import type { Component } from 'solid-js' type DemoPage = 'DefaultChart.tsx' | 'TypedChart.tsx' | 'Registerables.tsx' const App: Component = () => { - const demoPages: DemoPage[] = [ - 'DefaultChart.tsx', - 'TypedChart.tsx', - 'Registerables.tsx' - ] - + const demoPages: DemoPage[] = ['DefaultChart.tsx', 'TypedChart.tsx', 'Registerables.tsx'] + const [demoPage, setDemoPage] = createSignal(demoPages[0]) const onDemoPageSelect = (event: any) => { @@ -23,7 +19,11 @@ const App: Component = () => { return ( <>
- {(page) => ( -

or view source

+

+ or{' '} + + view source + +

- + @@ -45,7 +55,6 @@ const App: Component = () => { - ) } diff --git a/dev/pages/DefaultChart.tsx b/dev/pages/DefaultChart.tsx index cf41f72..13a369a 100644 --- a/dev/pages/DefaultChart.tsx +++ b/dev/pages/DefaultChart.tsx @@ -24,9 +24,7 @@ const DefaultChartPage: Component = () => { 'pie', 'scatter', ] - const [chartType, setChartType] = createSignal( - chartTypes[0], - ) + const [chartType, setChartType] = createSignal(chartTypes[0]) const onRandomizeClick = () => { setChartData((prev) => generateRandomChartData(prev.datasets.length)) diff --git a/dev/styles/App.module.css b/dev/styles/App.module.css index a2288ce..59db7c7 100644 --- a/dev/styles/App.module.css +++ b/dev/styles/App.module.css @@ -129,4 +129,4 @@ button:hover { .link:hover, .link:focus { color: #183a5c; -} \ No newline at end of file +} From 350f9012a7f090046ad3b2fb774f1f90a6aa9def Mon Sep 17 00:00:00 2001 From: ZanzyTHEbar Date: Sat, 20 May 2023 14:07:50 +0100 Subject: [PATCH 4/8] ci(cigh-actions): remove format.yml - add format step to release.yml --- .github/workflows/format.yml | 29 ----------------------------- .github/workflows/release.yml | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/format.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml deleted file mode 100644 index 381a09d..0000000 --- a/.github/workflows/format.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Format - -on: - push: - branches: [main] - -jobs: - format: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2.2.4 - - - name: Setup Node.js environment - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Install dependencies - run: pnpm install - - - name: Format - run: pnpm format - - - name: Add, Commit and Push - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: 'refactor: Format' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 743126f..eae6e38 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -100,3 +100,21 @@ jobs: uses: geekyeggo/delete-artifact@v1 with: name: production-files + + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2.2.4 + - name: Setup Node.js environment + uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install dependencies + run: pnpm install + - name: Format code base + run: pnpm format + - name: Add, Commit and Push formatted code + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: 'refactor: Format' From b71775f647dd392f7347c1aab0ddc52d91717d3c Mon Sep 17 00:00:00 2001 From: ZanzyTHEbar Date: Sat, 20 May 2023 14:08:59 +0100 Subject: [PATCH 5/8] ci(ci-ghActions): remove format.yml - add format step to release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eae6e38..a982ace 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,7 +90,7 @@ jobs: semantic-release cleanup: - name: Cleanup actions + name: Cleanup build artifacts needs: - deploy runs-on: ubuntu-latest From 25acf9842fd213312dddd2722aa14813db197dc3 Mon Sep 17 00:00:00 2001 From: ZanzyTHEbar Date: Sat, 20 May 2023 14:09:54 +0100 Subject: [PATCH 6/8] ci(ci-ghActions): remove format.yml - add format step to release.yml --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a982ace..385a0f8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,6 +102,9 @@ jobs: name: production-files format: + name: Format code + needs: + - cleanup runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 4493a6340d2660650f6841ce508e1f65bd87c9e7 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 22 May 2023 22:34:35 +0000 Subject: [PATCH 7/8] chore(minor): 1.0.0-develop.1 [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 1.0.0-develop.1 (2023-05-22) ### πŸ• Features * add styling to AllCharts ([27b0dfe](https://github.com/s0ftik3/solid-chartjs/commit/27b0dfeb94c6f8ff21ac4893c1e6c0b01d628f00)) * major ([d2ea868](https://github.com/s0ftik3/solid-chartjs/commit/d2ea8681d8bba86bcab887060a05b798ae14b879)) * minor ([bbaddf3](https://github.com/s0ftik3/solid-chartjs/commit/bbaddf354f79500968b9ff688048807bc5a1a64a)) * plugin implementation ([bb22200](https://github.com/s0ftik3/solid-chartjs/commit/bb22200fa23909e0d9fcbc0660f6573a167b5a12)) ### πŸ“ Documentation * fix ([e4c6e97](https://github.com/s0ftik3/solid-chartjs/commit/e4c6e97bd4be18413885fb80d9901317fcde4726)) * fix ([89c36e7](https://github.com/s0ftik3/solid-chartjs/commit/89c36e706975ca026fa0e262e11a8e1eb8243635)) * telegram group chat link ([b113f2f](https://github.com/s0ftik3/solid-chartjs/commit/b113f2f12e4bed9f2503f2a7942ce05238ff3aa8)) * update readme to reflect new api ([bd234a3](https://github.com/s0ftik3/solid-chartjs/commit/bd234a336b155370077be7f2dbc586f4345580f9)) ### πŸ§‘β€πŸ’» Code Refactoring * Format ([2231e9c](https://github.com/s0ftik3/solid-chartjs/commit/2231e9c47c65c3eaff54a72bb1b66055bc01e37e)) * remove hello world component ([4ad1649](https://github.com/s0ftik3/solid-chartjs/commit/4ad1649c1e25582ba982b3c16bcfb3c50d262023)) * remove unused utils.ts ([85c4311](https://github.com/s0ftik3/solid-chartjs/commit/85c431191d981516a712adfcf80c7af34ccba3b5)) ### πŸ” Continuous Integration * **ci-ghActions:** remove format.yml ([25acf98](https://github.com/s0ftik3/solid-chartjs/commit/25acf9842fd213312dddd2722aa14813db197dc3)) * **ci-ghActions:** remove format.yml ([b71775f](https://github.com/s0ftik3/solid-chartjs/commit/b71775f647dd392f7347c1aab0ddc52d91717d3c)) * **cigh-actions:** remove format.yml ([350f901](https://github.com/s0ftik3/solid-chartjs/commit/350f9012a7f090046ad3b2fb774f1f90a6aa9def)) * **ci-semver:** setup automating semantic versioning ([bb09baa](https://github.com/s0ftik3/solid-chartjs/commit/bb09baac30093774b4e9581f0f9d3dd39ba69a96)) ### πŸ› Bug Fixes * add back in demo ([af0a9c9](https://github.com/s0ftik3/solid-chartjs/commit/af0a9c92c38ebea49a0b732be8b05e744e4f5cdd)) * clean up typedcharts and readme ([40d343c](https://github.com/s0ftik3/solid-chartjs/commit/40d343ca76e144dedc653692d094ec3a050fe2ec)) * clean up typedcharts and readme ([c2ab929](https://github.com/s0ftik3/solid-chartjs/commit/c2ab9298b4684e34f9f0c755e3b23411ccdf10fe)) * closes [#1](https://github.com/s0ftik3/solid-chartjs/issues/1) and closes [#2](https://github.com/s0ftik3/solid-chartjs/issues/2) ([dfbac50](https://github.com/s0ftik3/solid-chartjs/commit/dfbac50fb4b1ef4a2adce47b88a417b342284b9f)) * fix forward ref of chart ([d125753](https://github.com/s0ftik3/solid-chartjs/commit/d1257537b6a486b3769cf576e7d5a3998401013b)) * fixing requested changes ([df59246](https://github.com/s0ftik3/solid-chartjs/commit/df59246eac0b9dc7a65ec0dd7e82fc41a9101dae)) * make ref optional ([e9f64c8](https://github.com/s0ftik3/solid-chartjs/commit/e9f64c8231580acb04a0e19020b9addcd2b33f46)) * minor ([23a0c18](https://github.com/s0ftik3/solid-chartjs/commit/23a0c18571b0f6a4848e19dc953df358410e5ca9)) * minor ([206d705](https://github.com/s0ftik3/solid-chartjs/commit/206d705fb26a66ec8cdecc17927dabbae4bd218e)) * minor ([db0e984](https://github.com/s0ftik3/solid-chartjs/commit/db0e9844d8cad63cdb667442f60112f8d47b1b6b)) * minor ([dc85cb1](https://github.com/s0ftik3/solid-chartjs/commit/dc85cb1bdf6abf406b7a0aa5dc6f3391f27cbc98)) * minor ([2c6174d](https://github.com/s0ftik3/solid-chartjs/commit/2c6174dd7cf34b2308a74a9c210195462e3f4761)) * minor ([1bf620d](https://github.com/s0ftik3/solid-chartjs/commit/1bf620db592a2222b38a91e6f22d59d730bdf5bf)) * minor ([4fec6dc](https://github.com/s0ftik3/solid-chartjs/commit/4fec6dc8dc3ed31727359943f6ba287976d42b2c)) * minor ([4c7cae9](https://github.com/s0ftik3/solid-chartjs/commit/4c7cae97b59289e26b1660551716c37104a89cac)) * minor ([e2b49a8](https://github.com/s0ftik3/solid-chartjs/commit/e2b49a86b86bd605c8f8bc764f860bf20d25b0b2)) * minor ([c9dbbef](https://github.com/s0ftik3/solid-chartjs/commit/c9dbbef76ef5096f2e21d37f2b0d07977b72238a)) * minor ([a7cca1a](https://github.com/s0ftik3/solid-chartjs/commit/a7cca1a10b0a34e2d7e202fb3b7395e77079998c)) * minor ([89bc60d](https://github.com/s0ftik3/solid-chartjs/commit/89bc60d2b25c64fc68498dda1c59212631653f29)) * minor ([52a6b9a](https://github.com/s0ftik3/solid-chartjs/commit/52a6b9a2ebd47e6e28f6e64d0699a96c6f169cb6)) * minor ([53eed0d](https://github.com/s0ftik3/solid-chartjs/commit/53eed0d24ed961f8684923ed9d54087b4f767357)) * name of vscode workspace ([69761f0](https://github.com/s0ftik3/solid-chartjs/commit/69761f0d251778fb6e314d7ecd5992a4dfcac36a)) * set App.tsx back to the default ([97f164a](https://github.com/s0ftik3/solid-chartjs/commit/97f164a77b75ffafc465b959e8bbd318eea14613)) * temporary fix for actions ([9d1291a](https://github.com/s0ftik3/solid-chartjs/commit/9d1291ab460877dcf0964e6c5de31a36a06fb760)) * tests failing due to server ([1b1971c](https://github.com/s0ftik3/solid-chartjs/commit/1b1971c0fed25b11338810db79b1a54ae54f6ffe)) * update package.json ([0c5e52a](https://github.com/s0ftik3/solid-chartjs/commit/0c5e52af1ff88ba590923ee2c32eaa23e9cbaac1)) * update package.json ([9fe6365](https://github.com/s0ftik3/solid-chartjs/commit/9fe63657f5a98c60a8501a7b5a9a2432315b3c0e)) * update package.json ([749c356](https://github.com/s0ftik3/solid-chartjs/commit/749c356216f10be3ffa9c96a7e999180bd70b84a)) * update package.json ([4a52d69](https://github.com/s0ftik3/solid-chartjs/commit/4a52d6964e559746f9b093017e91b3f17a7f3beb)) * update tsup config ([c7e09fd](https://github.com/s0ftik3/solid-chartjs/commit/c7e09fd551a7de10294fb75bc23e233773b6ad6f)) --- CHANGELOG.md | 71 ++++++++++++++ package.json | 264 +++++++++++++++++++++++++-------------------------- 2 files changed, 203 insertions(+), 132 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..c212ec3 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,71 @@ +# πŸ“¦ Changelog +[![conventional commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org) +[![semantic versioning](https://img.shields.io/badge/semantic%20versioning-2.0.0-green.svg)](https://semver.org) +> All notable changes to this project will be documented in this file + +## 1.0.0-develop.1 (2023-05-22) + + +### πŸ• Features + +* add styling to AllCharts ([27b0dfe](https://github.com/s0ftik3/solid-chartjs/commit/27b0dfeb94c6f8ff21ac4893c1e6c0b01d628f00)) +* major ([d2ea868](https://github.com/s0ftik3/solid-chartjs/commit/d2ea8681d8bba86bcab887060a05b798ae14b879)) +* minor ([bbaddf3](https://github.com/s0ftik3/solid-chartjs/commit/bbaddf354f79500968b9ff688048807bc5a1a64a)) +* plugin implementation ([bb22200](https://github.com/s0ftik3/solid-chartjs/commit/bb22200fa23909e0d9fcbc0660f6573a167b5a12)) + + +### πŸ“ Documentation + +* fix ([e4c6e97](https://github.com/s0ftik3/solid-chartjs/commit/e4c6e97bd4be18413885fb80d9901317fcde4726)) +* fix ([89c36e7](https://github.com/s0ftik3/solid-chartjs/commit/89c36e706975ca026fa0e262e11a8e1eb8243635)) +* telegram group chat link ([b113f2f](https://github.com/s0ftik3/solid-chartjs/commit/b113f2f12e4bed9f2503f2a7942ce05238ff3aa8)) +* update readme to reflect new api ([bd234a3](https://github.com/s0ftik3/solid-chartjs/commit/bd234a336b155370077be7f2dbc586f4345580f9)) + + +### πŸ§‘β€πŸ’» Code Refactoring + +* Format ([2231e9c](https://github.com/s0ftik3/solid-chartjs/commit/2231e9c47c65c3eaff54a72bb1b66055bc01e37e)) +* remove hello world component ([4ad1649](https://github.com/s0ftik3/solid-chartjs/commit/4ad1649c1e25582ba982b3c16bcfb3c50d262023)) +* remove unused utils.ts ([85c4311](https://github.com/s0ftik3/solid-chartjs/commit/85c431191d981516a712adfcf80c7af34ccba3b5)) + + +### πŸ” Continuous Integration + +* **ci-ghActions:** remove format.yml ([25acf98](https://github.com/s0ftik3/solid-chartjs/commit/25acf9842fd213312dddd2722aa14813db197dc3)) +* **ci-ghActions:** remove format.yml ([b71775f](https://github.com/s0ftik3/solid-chartjs/commit/b71775f647dd392f7347c1aab0ddc52d91717d3c)) +* **cigh-actions:** remove format.yml ([350f901](https://github.com/s0ftik3/solid-chartjs/commit/350f9012a7f090046ad3b2fb774f1f90a6aa9def)) +* **ci-semver:** setup automating semantic versioning ([bb09baa](https://github.com/s0ftik3/solid-chartjs/commit/bb09baac30093774b4e9581f0f9d3dd39ba69a96)) + + +### πŸ› Bug Fixes + +* add back in demo ([af0a9c9](https://github.com/s0ftik3/solid-chartjs/commit/af0a9c92c38ebea49a0b732be8b05e744e4f5cdd)) +* clean up typedcharts and readme ([40d343c](https://github.com/s0ftik3/solid-chartjs/commit/40d343ca76e144dedc653692d094ec3a050fe2ec)) +* clean up typedcharts and readme ([c2ab929](https://github.com/s0ftik3/solid-chartjs/commit/c2ab9298b4684e34f9f0c755e3b23411ccdf10fe)) +* closes [#1](https://github.com/s0ftik3/solid-chartjs/issues/1) and closes [#2](https://github.com/s0ftik3/solid-chartjs/issues/2) ([dfbac50](https://github.com/s0ftik3/solid-chartjs/commit/dfbac50fb4b1ef4a2adce47b88a417b342284b9f)) +* fix forward ref of chart ([d125753](https://github.com/s0ftik3/solid-chartjs/commit/d1257537b6a486b3769cf576e7d5a3998401013b)) +* fixing requested changes ([df59246](https://github.com/s0ftik3/solid-chartjs/commit/df59246eac0b9dc7a65ec0dd7e82fc41a9101dae)) +* make ref optional ([e9f64c8](https://github.com/s0ftik3/solid-chartjs/commit/e9f64c8231580acb04a0e19020b9addcd2b33f46)) +* minor ([23a0c18](https://github.com/s0ftik3/solid-chartjs/commit/23a0c18571b0f6a4848e19dc953df358410e5ca9)) +* minor ([206d705](https://github.com/s0ftik3/solid-chartjs/commit/206d705fb26a66ec8cdecc17927dabbae4bd218e)) +* minor ([db0e984](https://github.com/s0ftik3/solid-chartjs/commit/db0e9844d8cad63cdb667442f60112f8d47b1b6b)) +* minor ([dc85cb1](https://github.com/s0ftik3/solid-chartjs/commit/dc85cb1bdf6abf406b7a0aa5dc6f3391f27cbc98)) +* minor ([2c6174d](https://github.com/s0ftik3/solid-chartjs/commit/2c6174dd7cf34b2308a74a9c210195462e3f4761)) +* minor ([1bf620d](https://github.com/s0ftik3/solid-chartjs/commit/1bf620db592a2222b38a91e6f22d59d730bdf5bf)) +* minor ([4fec6dc](https://github.com/s0ftik3/solid-chartjs/commit/4fec6dc8dc3ed31727359943f6ba287976d42b2c)) +* minor ([4c7cae9](https://github.com/s0ftik3/solid-chartjs/commit/4c7cae97b59289e26b1660551716c37104a89cac)) +* minor ([e2b49a8](https://github.com/s0ftik3/solid-chartjs/commit/e2b49a86b86bd605c8f8bc764f860bf20d25b0b2)) +* minor ([c9dbbef](https://github.com/s0ftik3/solid-chartjs/commit/c9dbbef76ef5096f2e21d37f2b0d07977b72238a)) +* minor ([a7cca1a](https://github.com/s0ftik3/solid-chartjs/commit/a7cca1a10b0a34e2d7e202fb3b7395e77079998c)) +* minor ([89bc60d](https://github.com/s0ftik3/solid-chartjs/commit/89bc60d2b25c64fc68498dda1c59212631653f29)) +* minor ([52a6b9a](https://github.com/s0ftik3/solid-chartjs/commit/52a6b9a2ebd47e6e28f6e64d0699a96c6f169cb6)) +* minor ([53eed0d](https://github.com/s0ftik3/solid-chartjs/commit/53eed0d24ed961f8684923ed9d54087b4f767357)) +* name of vscode workspace ([69761f0](https://github.com/s0ftik3/solid-chartjs/commit/69761f0d251778fb6e314d7ecd5992a4dfcac36a)) +* set App.tsx back to the default ([97f164a](https://github.com/s0ftik3/solid-chartjs/commit/97f164a77b75ffafc465b959e8bbd318eea14613)) +* temporary fix for actions ([9d1291a](https://github.com/s0ftik3/solid-chartjs/commit/9d1291ab460877dcf0964e6c5de31a36a06fb760)) +* tests failing due to server ([1b1971c](https://github.com/s0ftik3/solid-chartjs/commit/1b1971c0fed25b11338810db79b1a54ae54f6ffe)) +* update package.json ([0c5e52a](https://github.com/s0ftik3/solid-chartjs/commit/0c5e52af1ff88ba590923ee2c32eaa23e9cbaac1)) +* update package.json ([9fe6365](https://github.com/s0ftik3/solid-chartjs/commit/9fe63657f5a98c60a8501a7b5a9a2432315b3c0e)) +* update package.json ([749c356](https://github.com/s0ftik3/solid-chartjs/commit/749c356216f10be3ffa9c96a7e999180bd70b84a)) +* update package.json ([4a52d69](https://github.com/s0ftik3/solid-chartjs/commit/4a52d6964e559746f9b093017e91b3f17a7f3beb)) +* update tsup config ([c7e09fd](https://github.com/s0ftik3/solid-chartjs/commit/c7e09fd551a7de10294fb75bc23e233773b6ad6f)) diff --git a/package.json b/package.json index 23e09f7..36bf33c 100644 --- a/package.json +++ b/package.json @@ -1,139 +1,139 @@ { - "name": "solid-chartjs", - "type": "module", - "version": "1.3.8", - "description": "SolidJS components for Chart.js", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/s0ftik3/solid-chartjs.git" + "name": "solid-chartjs", + "type": "module", + "version": "1.0.0-develop.1", + "description": "SolidJS components for Chart.js", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/s0ftik3/solid-chartjs.git" + }, + "bugs": { + "url": "https://github.com/s0ftik3/solid-chartjs/issues" + }, + "files": [ + "dist" + ], + "private": false, + "sideEffects": false, + "exports": { + "solid": { + "development": "./dist/index.dev.jsx", + "import": "./dist/index.jsx" }, - "bugs": { - "url": "https://github.com/s0ftik3/solid-chartjs/issues" - }, - "files": [ - "dist" - ], - "private": false, - "sideEffects": false, - "exports": { - "solid": { - "development": "./dist/index.dev.jsx", - "import": "./dist/index.jsx" - }, - "browser": { - "development": { - "require": "./dist/index.dev.cjs", - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.dev.js" - } - }, - "require": "./dist/index.cjs", - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" - } - }, - "development": { - "require": "./dist/index.dev.cjs", - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.dev.js" - } - }, - "require": "./dist/index.cjs", + "browser": { + "development": { + "require": "./dist/index.dev.cjs", "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" + "types": "./dist/index.d.ts", + "default": "./dist/index.dev.js" } + }, + "require": "./dist/index.cjs", + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } }, - "main": "./dist/index.cjs", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", - "browser": {}, - "typesVersions": {}, - "scripts": { - "dev": "vite serve dev", - "build": "tsup", - "test": "concurrently pnpm:test:*", - "test:client": "vitest", - "test:ssr": "pnpm run test:client --mode ssr", - "prepublishOnly": "pnpm build", - "format": "prettier --ignore-path .gitignore -w \"src/**/*.{js,ts,json,css,tsx,jsx}\" \"dev/**/*.{js,ts,json,css,tsx,jsx}\"", - "lint": "eslint --ext .js,.ts,.jsx,.tsx src", - "format:eslint": "pnpm run lint --fix & pnpm prettier --write \"src/**/*.{js,jsx,ts,tsx}\"", - "update-deps": "pnpm up -Li", - "typecheck": "tsc --noEmit" - }, - "peerDependencies": { - "@solid-primitives/refs": "^1.0.3", - "chart.js": "^4.3.0", - "solid-js": "^1.7.5" - }, - "devDependencies": { - "@babel/core": "^7.21.8", - "@babel/preset-env": "^7.21.5", - "@rollup/plugin-node-resolve": "^15.0.2", - "@size-limit/preset-big-lib": "^8.2.4", - "@swc/core": "^1.3.58", - "@swc/helpers": "^0.5.1", - "@testing-library/jest-dom": "^5.16.5", - "@types/node": "^20.1.4", - "@types/testing-library__jest-dom": "^5.14.5", - "@typescript-eslint/eslint-plugin": "^5.59.6", - "@typescript-eslint/parser": "^5.59.6", - "@vitest/coverage-c8": "^0.31.0", - "@solid-primitives/refs": "^1.0.3", - "babel-loader": "^9.1.2", - "browserslist": "^4.21.5", - "chart.js": "^4.3.0", - "chartjs-adapter-date-fns": "^3.0.0", - "chartjs-plugin-annotation": "^3.0.1", - "chartjs-plugin-zoom": "^2.0.1", - "concurrently": "^8.0.1", - "esbuild": "^0.17.19", - "esbuild-plugin-solid": "^0.5.0", - "eslint": "^8.40.0", - "eslint-config-google": "^0.14.0", - "eslint-config-prettier": "^8.8.0", - "eslint-config-standard": "^17.0.0", - "eslint-config-standard-react": "^13.0.0", - "eslint-import-resolver-typescript": "^3.5.5", - "eslint-plugin-autofix": "^1.1.0", - "eslint-plugin-import": "^2.27.5", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-solid": "^0.12.1", - "jsdom": "^22.0.0", - "prettier": "^2.8.8", - "solid-js": "^1.7.5", - "tsd": "^0.28.1", - "tsup": "^6.5.0", - "tsup-preset-solid": "^0.0.6", - "typescript": "^5.0.4", - "vite": "^4.3.6", - "vite-plugin-solid": "^2.7.0", - "vitest": "^0.31.0", - "vitest-canvas-mock": "^0.2.2" - }, - "dependencies": { - "minifaker": "^1.34.1" + "development": { + "require": "./dist/index.dev.cjs", + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.dev.js" + } }, - "keywords": [ - "solid", - "solidjs", - "solid-js", - "solid js", - "chart", - "chart-js", - "chart.js", - "solid-chartjs-2", - "solidjs-chartjs-2", - "solid chart.js", - "solidjs chart.js", - "solid-chart.js" - ], - "packageManager": "pnpm@7.22.0" + "require": "./dist/index.cjs", + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + }, + "main": "./dist/index.cjs", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "browser": {}, + "typesVersions": {}, + "scripts": { + "dev": "vite serve dev", + "build": "tsup", + "test": "concurrently pnpm:test:*", + "test:client": "vitest", + "test:ssr": "pnpm run test:client --mode ssr", + "prepublishOnly": "pnpm build", + "format": "prettier --ignore-path .gitignore -w \"src/**/*.{js,ts,json,css,tsx,jsx}\" \"dev/**/*.{js,ts,json,css,tsx,jsx}\"", + "lint": "eslint --ext .js,.ts,.jsx,.tsx src", + "format:eslint": "pnpm run lint --fix & pnpm prettier --write \"src/**/*.{js,jsx,ts,tsx}\"", + "update-deps": "pnpm up -Li", + "typecheck": "tsc --noEmit" + }, + "peerDependencies": { + "@solid-primitives/refs": "^1.0.3", + "chart.js": "^4.3.0", + "solid-js": "^1.7.5" + }, + "devDependencies": { + "@babel/core": "^7.21.8", + "@babel/preset-env": "^7.21.5", + "@rollup/plugin-node-resolve": "^15.0.2", + "@size-limit/preset-big-lib": "^8.2.4", + "@swc/core": "^1.3.58", + "@swc/helpers": "^0.5.1", + "@testing-library/jest-dom": "^5.16.5", + "@types/node": "^20.1.4", + "@types/testing-library__jest-dom": "^5.14.5", + "@typescript-eslint/eslint-plugin": "^5.59.6", + "@typescript-eslint/parser": "^5.59.6", + "@vitest/coverage-c8": "^0.31.0", + "@solid-primitives/refs": "^1.0.3", + "babel-loader": "^9.1.2", + "browserslist": "^4.21.5", + "chart.js": "^4.3.0", + "chartjs-adapter-date-fns": "^3.0.0", + "chartjs-plugin-annotation": "^3.0.1", + "chartjs-plugin-zoom": "^2.0.1", + "concurrently": "^8.0.1", + "esbuild": "^0.17.19", + "esbuild-plugin-solid": "^0.5.0", + "eslint": "^8.40.0", + "eslint-config-google": "^0.14.0", + "eslint-config-prettier": "^8.8.0", + "eslint-config-standard": "^17.0.0", + "eslint-config-standard-react": "^13.0.0", + "eslint-import-resolver-typescript": "^3.5.5", + "eslint-plugin-autofix": "^1.1.0", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-solid": "^0.12.1", + "jsdom": "^22.0.0", + "prettier": "^2.8.8", + "solid-js": "^1.7.5", + "tsd": "^0.28.1", + "tsup": "^6.5.0", + "tsup-preset-solid": "^0.0.6", + "typescript": "^5.0.4", + "vite": "^4.3.6", + "vite-plugin-solid": "^2.7.0", + "vitest": "^0.31.0", + "vitest-canvas-mock": "^0.2.2" + }, + "dependencies": { + "minifaker": "^1.34.1" + }, + "keywords": [ + "solid", + "solidjs", + "solid-js", + "solid js", + "chart", + "chart-js", + "chart.js", + "solid-chartjs-2", + "solidjs-chartjs-2", + "solid chart.js", + "solidjs chart.js", + "solid-chart.js" + ], + "packageManager": "pnpm@7.22.0" } From 2ea002fe87c7ed5999deb500bc501d7edc0cd5f7 Mon Sep 17 00:00:00 2001 From: Vyacheslav Date: Sun, 28 May 2023 19:55:22 +0600 Subject: [PATCH 8/8] docs: fix --- README.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d45eb59..450f611 100644 --- a/README.md +++ b/README.md @@ -12,15 +12,14 @@ The `solid-chartjs` library is a SolidJS wrapper around the [`Chart.js`](https://www.chartjs.org) library, allowing you to easily create interactive charts in your SolidJS applications. -- [solid-chartjs](#solid-chartjs) - - [Quick start](#quick-start) - - [Chart Props](#chart-props) - - [Examples](#examples) - - [Credits](#credits) - - [Contributing](#contributing) - - [Contribution Guidelines](#contribution-guidelines) - - [Code and Commit Standards](#code-and-commit-standards) - - [License](#license) +- [Quick start](#quick-start) +- [Chart Props](#chart-props) +- [Examples](#examples) +- [Credits](#credits) +- [Contributing](#contributing) + - [Contribution Guidelines](#contribution-guidelines) +- [Code and Commit Standards](#code-and-commit-standards) +- [License](#license) ## Quick start @@ -143,9 +142,9 @@ const fallback = () => { ## Credits -- This library is _heavily_ inspired by [react-chartjs-2](https://react-chartjs-2.js.org/) -- Awesome charting library [Chart.js](https://www.chartjs.org) -- Flexible library for building user interfaces [SolidJs](https://www.solidjs.com/) +- This library is _heavily_ inspired by [react-chartjs-2](https://react-chartjs-2.js.org/) +- Awesome charting library [Chart.js](https://www.chartjs.org) +- Flexible library for building user interfaces [SolidJs](https://www.solidjs.com/) ## Contributing