-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from vnphanquang/main
Quality of Life Improvements for Development and Publication Workflow
- Loading branch information
Showing
25 changed files
with
1,033 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": ["@changesets/changelog-github", { "repo": "evilmartians/harmony" }], | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@evilmartians/harmony": minor | ||
--- | ||
|
||
set pacakge as ESM-first, prioritize ESM exports as `.js`, update CommonJS exports as `.cjs`, fix [publint](https://publint.dev/@evilmartians/[email protected]) recommendations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Changesets | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '.changeset/**' | ||
- '.github/workflows/changesets.yaml' | ||
workflow_dispatch: | ||
|
||
env: | ||
CI: true | ||
jobs: | ||
Version: | ||
# prevents this action from running on forks | ||
if: github.repository == 'evilmartians/harmony' | ||
permissions: | ||
contents: write # to create release (changesets/action) | ||
pull-requests: write # to create pull request (changesets/action) | ||
id-token: write # OpenID Connect token needed for provenance | ||
timeout-minutes: 5 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Deno | ||
uses: denoland/setup-deno@v2 | ||
with: | ||
deno-version: v2.x | ||
|
||
- name: Install node dependencies | ||
run: 'deno install' | ||
|
||
- name: Create release PR or Publish to npm | ||
uses: changesets/action@v1 | ||
with: | ||
version: deno task ci:changesets:version | ||
publish: deno task ci:changesets:publish | ||
commit: 'Changesets versioning & publication' | ||
title: 'Changesets: Versioning & Publication' | ||
createGithubReleases: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "scripts/**/*" | ||
- ".github/workflows/tests.yaml" | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
env: | ||
CI: true | ||
jobs: | ||
Test: | ||
if: github.repository == 'evilmartians/harmony' # prevents this action from running on forks | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Deno | ||
uses: denoland/setup-deno@v2 | ||
with: | ||
deno-version: v2.x | ||
|
||
- name: Install dependencies | ||
run: "deno install" | ||
|
||
- name: Lint | ||
run: "deno lint" | ||
|
||
- name: Type-check | ||
run: "deno check **/*.ts" | ||
|
||
- name: Build | ||
run: "deno task build" | ||
|
||
- name: Publint | ||
run: "deno task publint" | ||
|
||
- name: Run unit tests | ||
run: "deno task ci:test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
dist/ | ||
dist | ||
node_modules | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,27 @@ | ||
{ | ||
"tasks": { | ||
"build": "deno run --allow-read --allow-write scripts/build.ts", | ||
"publint": "deno run --allow-read --allow-env npm:publint", | ||
"test": "deno test --allow-read --allow-write", | ||
"update-snapshots": "deno test --allow-read --allow-write -- --update" | ||
"update-snapshots": "deno test --allow-read --allow-write -- --update", | ||
"changesets": "deno run -A npm:@changesets/cli", | ||
"ci:test": "deno test -A --clean --coverage=coverage --junit-path=coverage/junit.xml", | ||
"ci:coverage": "deno coverage --lcov --output=./coverage/coverage.lcov", | ||
"ci:changesets:version": "deno run -A npm:@changesets/cli version", | ||
"ci:changesets:publish": "deno run -A npm:@changesets/cli publish" | ||
}, | ||
"fmt": { | ||
"useTabs": false, | ||
"lineWidth": 100, | ||
"indentWidth": 2, | ||
"semiColons": true, | ||
"singleQuote": false, | ||
"proseWrap": "preserve" | ||
}, | ||
"nodeModulesDir": "auto", | ||
"imports": { | ||
"@std/assert": "jsr:@std/assert@^1.0.8", | ||
"@std/path": "jsr:@std/path@^1.0.8", | ||
"@std/testing": "jsr:@std/testing@^1.0.5" | ||
} | ||
} |
Oops, something went wrong.