Skip to content

Commit

Permalink
Merge pull request #111 from agendrix/upgrade-node
Browse files Browse the repository at this point in the history
Upgrade node20
  • Loading branch information
LouisBoudreau authored Oct 11, 2024
2 parents fa247bf + 8b66396 commit 6215192
Show file tree
Hide file tree
Showing 29 changed files with 31,145 additions and 7,566 deletions.
41 changes: 41 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "GitHub Actions (TypeScript)",
"image": "mcr.microsoft.com/devcontainers/typescript-node:20",
"postCreateCommand": "npm install",
"customizations": {
"codespaces": {
"openFiles": ["README.md"]
},
"vscode": {
"extensions": [
"bierner.markdown-preview-github-styles",
"davidanson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"github.copilot",
"github.copilot-chat",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"me-dutour-mathieu.vscode-github-actions",
"redhat.vscode-yaml",
"rvest.vs-code-prettier-eslint",
"yzhang.markdown-all-in-one"
],
"settings": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2,
"editor.formatOnSave": true,
"markdown.extension.list.indentationSize": "adaptive",
"markdown.extension.italic.indicator": "_",
"markdown.extension.orderedList.marker": "one"
}
}
},
"remoteEnv": {
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}"
},
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers-contrib/features/prettier:1": {}
}
}
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dist/
lib/
dist/
node_modules/
jest.config.js
coverage/
18 changes: 0 additions & 18 deletions .eslintrc.json

This file was deleted.

17 changes: 2 additions & 15 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
# Prevent build from appearing in github diff's
# https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github
dist/** -diff linguist-generated=true

# Control the archive attached to releases
# https://git-scm.com/docs/gitattributes#_creating_an_archive
* export-ignore

package.json -export-ignore
README.md -export-ignore
LICENSE -export-ignore
action.yml -export-ignore

dist/** -export-ignore
dist -export-ignore
* text=auto eol=lf

dist/** -diff linguist-generated=true
29 changes: 23 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
version: 2
updates:
# Enable version updates for npm
- package-ecosystem: 'npm'
# Look for `package.json` and `lock` files in the `root` directory
directory: '/'
# Check the npm registry for updates every day (weekdays)
- package-ecosystem: github-actions
directory: /
schedule:
interval: 'daily'
interval: weekly
groups:
actions-minor:
update-types:
- minor
- patch

- package-ecosystem: npm
directory: /
schedule:
interval: weekly
groups:
npm-development:
dependency-type: development
update-types:
- minor
- patch
npm-production:
dependency-type: production
update-types:
- patch
76 changes: 76 additions & 0 deletions .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
env:
node: true
es6: true
jest: true

globals:
Atomics: readonly
SharedArrayBuffer: readonly

ignorePatterns:
- "!.*"
- "**/node_modules/.*"
- "**/dist/.*"
- "**/coverage/.*"
- "*.json"

parser: "@typescript-eslint/parser"

parserOptions:
ecmaVersion: 2023
sourceType: module
project:
- "./.github/linters/tsconfig.json"
- "./tsconfig.json"

plugins:
- jest
- "@typescript-eslint"

extends:
- eslint:recommended
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
- plugin:jest/recommended

rules:
{
"camelcase": "off",
"eslint-comments/no-use": "off",
"eslint-comments/no-unused-disable": "off",
"i18n-text/no-en": "off",
"import/no-namespace": "off",
"no-console": "off",
"no-unused-vars": "off",
"semi": "off",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "no-public" }],
"@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/space-before-function-paren": "off",
"@typescript-eslint/unbound-method": "error"
}
18 changes: 18 additions & 0 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Unordered list style
MD004:
style: dash

# Ordered list item prefix
MD029:
style: one

# Spaces after list markers
MD030:
ul_single: 1
ol_single: 1
ul_multi: 1
ol_multi: 1

# Code block style
MD046:
style: fenced
10 changes: 10 additions & 0 deletions .github/linters/.yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
rules:
document-end: disable
document-start:
level: warning
present: false
line-length:
level: warning
max: 80
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true
9 changes: 9 additions & 0 deletions .github/linters/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "../../tsconfig.json",
"compilerOptions": {
"noEmit": true
},
"include": ["../../__tests__/**/*", "../../src/**/*"],
"exclude": ["../../dist", "../../node_modules", "../../coverage", "*.json"]
}
12 changes: 3 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
name: 'build-test'
name: "build-test"
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- 'releases/*'
- "releases/*"

jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"

- uses: actions/checkout@v4
- run: |
yarn
- run: |
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,8 @@ Thumbs.db

# Ignore built ts files
__tests__/runner/*
lib/**/*

# IDE files
.idea
.vscode
*.code-workspace
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dist/
lib/
node_modules/
node_modules/
coverage/
10 changes: 8 additions & 2 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"printWidth": 80,
"printWidth": 200,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "avoid"
"bracketSameLine": true,
"arrowParens": "avoid",
"proseWrap": "always",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "lf"
}
4 changes: 3 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
* @actions/actions-runtime
# Repository CODEOWNERS

* @actions/actions-oss-maintainers
13 changes: 6 additions & 7 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
MIT License

The MIT License (MIT)

Copyright (c) 2018 GitHub, Inc. and contributors
Copyright GitHub

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -10,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
14 changes: 7 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: Get current run conclusion
description: Compute the conclusion of the current workflow run
author: '[email protected]'
author: "[email protected]"
inputs:
token:
required: true
description: "This should be a personal access token with access to your repository"
default: ${{ github.token }}
deployment_outcome:
deployment_outcome:
required: false
description: >
Outcome of the deployment(s). If you want the action to verify multiple deployments, you must stringify.
Accepted values are any values from DeploymentOutcome enum: https://github.com/agendrix/wait-for-ecs-service-deployment-action/blob/main/src/ecs/types.ts
Ex: needs.deploy.deployment_outcome or toJSON([needs.deploy-1.deployment_outcome, needs.deploy-2.deployment_outcome])
Outcome of the deployment(s). If you want the action to verify multiple deployments, you must stringify. Accepted values are any values from DeploymentOutcome enum:
https://github.com/agendrix/wait-for-ecs-service-deployment-action/blob/main/src/ecs/types.ts Ex: needs.deploy.deployment_outcome or toJSON([needs.deploy-1.deployment_outcome,
needs.deploy-2.deployment_outcome])
outputs:
conclusion:
description: Conclusion of the current workflow run
runs:
using: 'node16'
main: 'dist/index.js'
using: "node20"
main: "dist/index.js"
1 change: 1 addition & 0 deletions badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6215192

Please sign in to comment.