Skip to content

Commit

Permalink
Update dependencies and configuration files (#846)
Browse files Browse the repository at this point in the history
* Introduce Changeset

* Migrate package manager to pnpm from yarn

* Set package manager to [email protected]

* Migrate formater and linter to biome from eslint and prettier

* chore: Migrate build and test tool to vite/vitest from rollup/jest

* Setup pnpm workspace and ignore "example" in Changeset configuration

* Remove  VSCode settings file

* Update dependencies and configuration files

* Remove .github/FUNDING.yml

* Explicitly state that Node.js 16 or higher should be guaranteed to work with the latest TypeDoc

* Add typecheck script for TypeScript type checking

* Update package.json exports

* Add "provenance" flag to publishConfig in package.json

* Update pnpm-lock.yaml

* Update CI/CD Workflow

* Fix CI/CD to checkout before setup

* Fix Setup composite action to set shell on Install Dependencies job

* Fix format with biome and fix biome configs

* Update MermaidPlugin initialization in plugin.test.ts

* Fix format

* Fix env variable name

* Update test job, run only linux
  • Loading branch information
kamiazya authored Jun 12, 2024
1 parent 73fdae3 commit b5f14d9
Show file tree
Hide file tree
Showing 41 changed files with 4,357 additions and 4,082 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
5 changes: 5 additions & 0 deletions .changeset/chilled-bottles-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"typedoc-plugin-mermaid": patch
---

Migrate formater and linter to biome from eslint and prettier
16 changes: 16 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "kamiazya/typedoc-plugin-mermaid"
}
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["example"]
}
5 changes: 5 additions & 0 deletions .changeset/kind-gorillas-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"typedoc-plugin-mermaid": patch
---

Add "provenance" flag to publishConfig in package.json
5 changes: 5 additions & 0 deletions .changeset/lovely-scissors-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"typedoc-plugin-mermaid": patch
---

Add typecheck script for TypeScript type checking
5 changes: 5 additions & 0 deletions .changeset/lucky-weeks-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'typedoc-plugin-mermaid': patch
---

Introduce Changeset.
7 changes: 7 additions & 0 deletions .changeset/orange-hotels-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'typedoc-plugin-mermaid': patch
---

Migrate package manager to pnpm from yarn

- Setup pnpm workspace and ignore "example" in Changeset configuration
5 changes: 5 additions & 0 deletions .changeset/pretty-dolphins-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"typedoc-plugin-mermaid": minor
---

Explicitly state that Node.js 16 or higher should be guaranteed to work with the latest TypeDoc
5 changes: 5 additions & 0 deletions .changeset/proud-dots-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"typedoc-plugin-mermaid": minor
---

Update CI/CD Workflow
5 changes: 5 additions & 0 deletions .changeset/slimy-tools-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"typedoc-plugin-mermaid": patch
---

Update package.json exports
5 changes: 5 additions & 0 deletions .changeset/soft-ants-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"typedoc-plugin-mermaid": patch
---

Migrate build and test tool to vite/vitest from rollup/jest
5 changes: 5 additions & 0 deletions .changeset/weak-apples-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"typedoc-plugin-mermaid": patch
---

Update dependencies and configuration files
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

35 changes: 0 additions & 35 deletions .eslintrc.json

This file was deleted.

12 changes: 0 additions & 12 deletions .github/FUNDING.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Setup Action
description: Composite Setup Action
runs:
using: composite
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: ./.node-version
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
shell: bash
22 changes: 0 additions & 22 deletions .github/release-drafter.yml

This file was deleted.

117 changes: 117 additions & 0 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: CI/CD
on:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check_format:
name: Check format
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Setup
uses: ./.github/actions/setup
- name: Check format
run: pnpm lint
env:
CI: true

check_type:
name: Check type
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Setup
uses: ./.github/actions/setup
- name: Check type
run: pnpm typecheck
env:
CI: true

build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read
needs:
- check_format
- check_type
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Setup
uses: ./.github/actions/setup
- name: Build
run: pnpm build
env:
CI: true
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: dist
path: dist
test:
name: Test on node ${{ matrix.node-version }}
needs:
- check_format
- check_type
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x, 22.x]
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Setup
uses: ./.github/actions/setup
- name: Test
run: pnpm test
env:
CI: true

release:
name: Release
runs-on: ubuntu-latest
needs:
- build
- test
# if repository is github.com/kamiazya/typedoc-plugin-mermaid
# and branch is main
# and before job is successful
# then run this job
if: ${{ github.repository == 'kamiazya/typedoc-plugin-mermaid' && github.ref == 'refs/heads/main' && github.event_name == 'push' && needs.build.result == 'success' && needs.test.result == 'success' }}
permissions:
contents: write # Used to commit to "Version Packages" PR
pull-requests: write # Used to create "Version Packages" PR
id-token: write # Used to publish to npm with provenance statements
# Other permissions are defaulted to none
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Setup
uses: ./.github/actions/setup
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # v1.4.7
with:
publish: pnpm exec changeset publish
version: pnpm exec changeset version
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
outputs:
published: ${{ steps.changesets.outputs.published }}
62 changes: 0 additions & 62 deletions .github/workflows/nodejs.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/release-management.yml

This file was deleted.

Loading

0 comments on commit b5f14d9

Please sign in to comment.