-
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.
Convert to pnpm, add changesets, vitest, devbox, github actions
- Loading branch information
1 parent
ab9d3ad
commit 5fb8388
Showing
17 changed files
with
1,979 additions
and
2,603 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,14 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": [ | ||
"@cultureamp/changelog-github", | ||
{ "repo": "cultureamp/changelog-github" } | ||
], | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "master", | ||
"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 @@ | ||
--- | ||
"@cultureamp/changelog-github": patch | ||
--- | ||
|
||
Dependency updates |
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,7 @@ | ||
# Automatically sets up your devbox environment whenever you cd into this | ||
# directory via our direnv integration: | ||
|
||
eval "$(devbox generate direnv --print-envrc)" | ||
|
||
# check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/ | ||
# for more details |
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,22 @@ | ||
# This is a composite action (a step we can reuse in workflows) | ||
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action | ||
|
||
name: Setup repository | ||
description: Install and build packages | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- run: corepack enable | ||
shell: bash | ||
# setup node, install and cache packages | ||
- uses: actions/setup-node@v3 | ||
with: | ||
cache: pnpm | ||
node-version-file: .nvmrc | ||
registry-url: https://npm.pkg.github.com | ||
- run: pnpm install --frozen-lockfile | ||
shell: bash | ||
env: | ||
NODE_AUTH_TOKEN: ${{ github.token }} | ||
NODE_OPTIONS: "--max-old-space-size=4096" |
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,41 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
|
||
# When Changesets opens a PR it does not trigger GitHub actions, | ||
# because its token does not have permission to. This is a hack | ||
# to allow one of us to trigger GitHub actions for a changesets PR | ||
# by enabling automerge on the PR. | ||
pull_request_target: | ||
types: | ||
- auto_merge_enabled | ||
branches: | ||
- master # the target branch of the PR | ||
paths: | ||
- "**/CHANGELOG.md" # only changesets releases touch changelogs | ||
|
||
jobs: | ||
typescript: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/setup | ||
- run: pnpm compile | ||
|
||
prettier: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/setup | ||
- run: pnpm prettier | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/setup | ||
- name: Run unit tests | ||
run: pnpm 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: "canary release" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
label: | ||
description: "Pick a label for the release, to be included in the version number — e.g. '1.0.0-\\${label}.x' (note: can't contain slashes!)" | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/setup | ||
- name: "release (canary) with label: ${{ github.event.inputs.label }}" | ||
run: | | ||
pnpm compile | ||
pnpm changeset version --snapshot "$LABEL" | ||
pnpm changeset publish --tag "$LABEL" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ github.token }} | ||
LABEL: ${{ github.event.inputs.label }} |
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,20 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/setup | ||
- uses: changesets/action@v1 | ||
with: | ||
version: pnpm version:ci | ||
publish: pnpm publish:ci | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ github.token }} |
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,4 +1,4 @@ | ||
dist/ | ||
node_modules/ | ||
yarn-*.log | ||
.env | ||
.env |
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 @@ | ||
20.16.0 |
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,19 @@ | ||
# Ignore everything by default: | ||
* | ||
|
||
# Whitelist by file extension... | ||
!**/ | ||
!*.ts | ||
!*.tsx | ||
!*.js | ||
!*.json | ||
!*.css | ||
!*.scss | ||
!*.html | ||
|
||
# Override and explicitly ignore... | ||
**/node_modules/ | ||
**/build/ | ||
**/dist/ | ||
devbox.json | ||
.devbox |
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,17 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/main/.schema/devbox.schema.json", | ||
"packages": ["[email protected]"], | ||
"env": { | ||
"DEVBOX_COREPACK_ENABLED": "1", | ||
"npm_config_python": "/usr/bin/python3" | ||
}, | ||
"shell": { | ||
"init_hook": [ | ||
// keep nvmrc in sync with devbox's node version | ||
"node --version | sed 's/v//' > .nvmrc" | ||
], | ||
"scripts": { | ||
"setup": "pnpm install" | ||
} | ||
} | ||
} |
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,70 @@ | ||
{ | ||
"lockfile_version": "1", | ||
"packages": { | ||
"[email protected]": { | ||
"last_modified": "2024-08-31T10:12:23Z", | ||
"plugin_version": "0.0.2", | ||
"resolved": "github:NixOS/nixpkgs/5629520edecb69630a3f4d17d3d33fc96c13f6fe#nodejs_20", | ||
"source": "devbox-search", | ||
"version": "20.16.0", | ||
"systems": { | ||
"aarch64-darwin": { | ||
"outputs": [ | ||
{ | ||
"name": "out", | ||
"path": "/nix/store/iikbj8fwd3msxvh747v22b0gpf1rckww-nodejs-20.16.0", | ||
"default": true | ||
}, | ||
{ | ||
"name": "libv8", | ||
"path": "/nix/store/clzfgrh8fmzgr8jmv2266b30qh4mqlxa-nodejs-20.16.0-libv8" | ||
} | ||
], | ||
"store_path": "/nix/store/iikbj8fwd3msxvh747v22b0gpf1rckww-nodejs-20.16.0" | ||
}, | ||
"aarch64-linux": { | ||
"outputs": [ | ||
{ | ||
"name": "out", | ||
"path": "/nix/store/rbv8jmnhifp2znxc4issvl7zgmy7f24j-nodejs-20.16.0", | ||
"default": true | ||
}, | ||
{ | ||
"name": "libv8", | ||
"path": "/nix/store/2hqnq9snccm7n7346k5bqj657mp85lb3-nodejs-20.16.0-libv8" | ||
} | ||
], | ||
"store_path": "/nix/store/rbv8jmnhifp2znxc4issvl7zgmy7f24j-nodejs-20.16.0" | ||
}, | ||
"x86_64-darwin": { | ||
"outputs": [ | ||
{ | ||
"name": "out", | ||
"path": "/nix/store/azpkc2aw75nabkv9pq07j4rxw92fm7i6-nodejs-20.16.0", | ||
"default": true | ||
}, | ||
{ | ||
"name": "libv8", | ||
"path": "/nix/store/8qjcn62342vpl6r1l9f22l901fj8cqbc-nodejs-20.16.0-libv8" | ||
} | ||
], | ||
"store_path": "/nix/store/azpkc2aw75nabkv9pq07j4rxw92fm7i6-nodejs-20.16.0" | ||
}, | ||
"x86_64-linux": { | ||
"outputs": [ | ||
{ | ||
"name": "out", | ||
"path": "/nix/store/alik5i1lm5kfm61fh3pg221czk7pmv4g-nodejs-20.16.0", | ||
"default": true | ||
}, | ||
{ | ||
"name": "libv8", | ||
"path": "/nix/store/sl8zwksqc08asblhr5r36dlhzy6brmpk-nodejs-20.16.0-libv8" | ||
} | ||
], | ||
"store_path": "/nix/store/alik5i1lm5kfm61fh3pg221czk7pmv4g-nodejs-20.16.0" | ||
} | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"name": "@cultureamp/changelog-github", | ||
"version": "0.1.0", | ||
"packageManager": "[email protected]", | ||
"description": "Changelog generator based on atlassian/changelog-github", | ||
"main": "dist", | ||
"license": "MIT", | ||
|
@@ -16,21 +17,31 @@ | |
"dist/" | ||
], | ||
"scripts": { | ||
"test": "jest", | ||
"prepublish": "tsc" | ||
"test": "vitest run", | ||
"compile": "tsc --build", | ||
"prepublish": "tsc", | ||
"prettier": "prettier --check '**/*'", | ||
"prettier:fix": "prettier --write '**/*'", | ||
"version:ci": "pnpm compile && pnpm changeset version", | ||
"publish:ci": "pnpm compile && pnpm changeset publish" | ||
}, | ||
"dependencies": { | ||
"@changesets/get-github-info": "^0.5.0", | ||
"@changesets/types": "^4.0.1", | ||
"dotenv": "^8.1.0" | ||
"@changesets/get-github-info": "^0.6.0", | ||
"@changesets/types": "^6.0.0", | ||
"dotenv": "^16.4.5" | ||
}, | ||
"devDependencies": { | ||
"@changesets/parse": "^0.3.9", | ||
"@tsconfig/node14": "^1.0.1", | ||
"@types/jest": "^27.0.1", | ||
"@types/node": "^16.9.2", | ||
"jest": "^27.2.0", | ||
"ts-jest": "^27.0.5", | ||
"typescript": "^4.4.3" | ||
"@changesets/cli": "^2.27.9", | ||
"@changesets/parse": "^0.4.0", | ||
"@tsconfig/node14": "^14.1.2", | ||
"@types/node": "^22.8.6", | ||
"vitest": "^2.1.3", | ||
"typescript": "^5.6.3", | ||
"prettier": "^3.3.3" | ||
}, | ||
"prettier": { | ||
"semi": false, | ||
"arrowParens": "avoid", | ||
"trailingComma": "es5" | ||
} | ||
} |
Oops, something went wrong.