-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert to TS project #81
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
0d45671
Convert to TS project
spenserblack 1ddf419
Install pnpm in workflows
spenserblack 109304e
fixup! Install pnpm in workflows
spenserblack 55840c2
fixup! Install pnpm in workflows
spenserblack 77821de
Fix prettier config
spenserblack 7f8b8b9
Ignore coverage when formatting
spenserblack 3825340
Ignore pnpm lock
spenserblack eebbaef
Format
spenserblack 3f3e322
Reformat Markdown
spenserblack 6b09b42
Set devcontainer for TS project
spenserblack ec2574e
Rebuild
spenserblack a40a545
Use node 16
spenserblack ae6cbb7
Add function to check for wiki presence
spenserblack 0686ff0
Add function to check if repo has changes
spenserblack eee9971
Rewrite main script as TS action
spenserblack 41d719c
Format
spenserblack e8ff08f
Add back e2e/dogfood test
spenserblack dd9a10d
Format
spenserblack File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
{ | ||
"image": "mcr.microsoft.com/devcontainers/base", | ||
"name": "Node.js", | ||
"image": "mcr.microsoft.com/devcontainers/typescript-node:16", | ||
"features": { | ||
"ghcr.io/devcontainers-contrib/features/pnpm:2": {} | ||
}, | ||
"customizations": { | ||
"codespaces": { | ||
"openFiles": ["README.md", "CONTRIBUTING.md"] | ||
}, | ||
"vscode": { | ||
"extensions": [ | ||
"lizebang.bash-extension-pack", | ||
"EditorConfig.EditorConfig", | ||
"GitHub.vscode-github-actions" | ||
] | ||
"extensions": ["EditorConfig.EditorConfig"] | ||
} | ||
}, | ||
// https://webinstall.dev/ | ||
"postCreateCommand": "curl -sS https://webi.sh/shfmt | sh && curl -sS https://webi.sh/shellcheck | sh" | ||
"postCreateCommand": ".devcontainer/postCreate.sh", | ||
"remoteUser": "node" | ||
} |
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,2 @@ | ||
#!/bin/sh | ||
pnpm i |
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,5 +1,2 @@ | ||
action.yml linguist-detectable | ||
|
||
# This makes the newlines behave correctly in weird situations like running a | ||
# Windows-mounted CRLF file from within a WSL shell that expects LF. | ||
*.sh eol=lf | ||
dist/* binary | ||
tsconfig.json linguist-language=JSON-With-Comments |
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,52 @@ | ||
name: Check dist/ | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "**.md" | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "**.md" | ||
|
||
jobs: | ||
check-dist: | ||
name: Check dist/ | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16.x" | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Rebuild dist/ | ||
run: | | ||
pnpm build | ||
pnpm package | ||
|
||
- name: Compare diff | ||
run: | | ||
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | ||
echo "Detected uncommitted changes after build. See status below:" | ||
git diff | ||
exit 1 | ||
fi | ||
id: diff | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: ${{ failure() && steps.diff.conclusion == 'failure' }} | ||
with: | ||
name: dist | ||
path: dist/ |
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,55 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16.x" | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- run: pnpm build | ||
- run: pnpm package | ||
- name: Test | ||
run: pnpm test | ||
|
||
- name: Upload Coverage Report | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
format: | ||
name: Check Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16.x" | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- run: pnpm format-check |
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,16 +1,16 @@ | ||
name: Update tags | ||
on: | ||
release: | ||
types: [released] | ||
concurrency: | ||
group: update-tags | ||
cancel-in-progress: true | ||
permissions: | ||
contents: write | ||
jobs: | ||
update-tags: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
source-tag: ${{ github.event.release.tag_name }} | ||
name: Update tags | ||
on: | ||
release: | ||
types: [released] | ||
concurrency: | ||
group: update-tags | ||
cancel-in-progress: true | ||
permissions: | ||
contents: write | ||
jobs: | ||
update-tags: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
source-tag: ${{ github.event.release.tag_name }} |
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,3 @@ | ||
node_modules/ | ||
/lib/ | ||
/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/node_modules/ | ||
/coverage/ | ||
/dist/ | ||
/lib/ | ||
pnpm-lock.yaml |
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,4 @@ | ||
{ | ||
"printWidth": 88, | ||
"trailingComma": "all" | ||
} |
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,37 +1,35 @@ | ||
**Thanks for taking the time to contribute! ❤️** | ||
|
||
All types of contributions are encouraged and valued, no matter if it's a bug | ||
report 🐛, a feature request 💡, or a Pull Request 🚀. | ||
|
||
- **❓ I have a question:** [Open a Q&A Discussion] | ||
- **🐛 I found a bug:** [Open an Issue] | ||
- **💡 I have an idea:** [Open an Idea Discussion] | ||
- **💻 I want to code:** See below | ||
|
||
## Contributing code | ||
|
||
1. 🔀 Fork the repo | ||
2. 💻 Open the repo in your editor | ||
3. 👨💻 Add your changes to your workspace | ||
4. 🔖 Commit & push your changes | ||
5. 🔁 Open a PR to get your changes merged | ||
6. 🧪 Let the tests run to make sure everything works | ||
7. 🚀 Profit! | ||
|
||
🚀 For a seamless coding experience, we recommend using VS Code or GitHub | ||
Codespaces as your editor! With VS Code's extensions and customizable settings, | ||
you can tailor your environment to suit your preferences. 🌟 Plus, for GitHub | ||
Codespaces users, we provide a `devcontainer.json` config for a ready-to-use | ||
development environment. 🛠️ Enhance your coding productivity and enjoyment with | ||
these powerful editors! 😊 | ||
|
||
We use [EditorConfig] to specify the spacing and file conventions for this | ||
project. Make sure you _try_ to conform with it. Editors like VS Code have | ||
extensions that will do this automatically for you! 😉 | ||
|
||
<!-- prettier-ignore-start --> | ||
[open an issue]: https://github.com/spenserblack/actions-wiki/issues/new | ||
[open a Q&A discussion]: https://github.com/spenserblack/actions-wiki/discussions/new?category=q-a | ||
[open an idea discussion]: https://github.com/spenserblack/actions-wiki/discussions/new?category=ideas | ||
[editorconfig]: https://editorconfig.org/ | ||
<!-- prettier-ignore-end --> | ||
**Thanks for taking the time to contribute! ❤️** | ||
|
||
All types of contributions are encouraged and valued, no matter if it's a bug | ||
report 🐛, a feature request 💡, or a Pull Request 🚀. | ||
|
||
- **❓ I have a question:** [Open a Q&A Discussion][new-qa] | ||
- **🐛 I found a bug:** [Open an Issue][new-issue] | ||
- **💡 I have an idea:** [Open an Idea Discussion][new-idea] | ||
- **💻 I want to code:** See below | ||
|
||
## Contributing code | ||
|
||
1. 🔀 Fork the repo | ||
2. 💻 Open the repo in your editor | ||
3. 👨💻 Add your changes to your workspace | ||
4. 🔖 Commit & push your changes | ||
5. 🔁 Open a PR to get your changes merged | ||
6. 🧪 Let the tests run to make sure everything works | ||
7. 🚀 Profit! | ||
|
||
🚀 For a seamless coding experience, we recommend using VS Code or GitHub | ||
Codespaces as your editor! With VS Code's extensions and customizable settings, | ||
you can tailor your environment to suit your preferences. 🌟 Plus, for GitHub | ||
Codespaces users, we provide a `devcontainer.json` config for a ready-to-use | ||
development environment. 🛠️ Enhance your coding productivity and enjoyment with | ||
these powerful editors! 😊 | ||
|
||
We use [EditorConfig][editorconfig] to specify the spacing and file conventions for this | ||
project. Make sure you _try_ to conform with it. Editors like VS Code have | ||
extensions that will do this automatically for you! 😉 | ||
|
||
[new-issue]: https://github.com/spenserblack/actions-wiki/issues/new | ||
[new-qa]: https://github.com/spenserblack/actions-wiki/discussions/new?category=q-a | ||
[new-idea]: https://github.com/spenserblack/actions-wiki/discussions/new?category=ideas | ||
[editorconfig]: https://editorconfig.org/ |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is just one command after all 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a bit of future-proofing for when more post-create commands need to be added. Plus, it's a cheat to add a bit more language diversity to this project 😉