Skip to content
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

fix: upgrade dependencies #131

Merged
merged 10 commits into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 5 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,33 @@ on:
push:
branches:
- main
# See https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target for security implications.
pull_request_target:
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["12", "14"]
node-version: ["12", "14", "16"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Get info
id: info
run: |
echo ::set-output name=repo_name::$(echo $GITHUB_REPOSITORY| cut -d / -f 2)
echo ::set-output name=repo_owner::$(echo $GITHUB_REPOSITORY| cut -d / -f 1)

- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn install
run: yarn install --ignore-engines

- name: Check format and lint
if: matrix.node-version == 14
run: yarn run format-check && yarn run lint

- name: Run tests
run: yarn test

- name: Build and package
run: yarn run build

- name: SonarCloud Scan
if: matrix.node-version == 14
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=${{ steps.info.outputs.repo_owner }}
-Dsonar.projectKey=${{ steps.info.outputs.repo_name }}
run: yarn run build
42 changes: 42 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: 'sonar'
on:
push:
branches:
- main
# See https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target for security implications.
pull_request_target:
types: [opened, synchronize, reopened]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Get info
id: info
run: |
echo ::set-output name=repo_name::$(echo $GITHUB_REPOSITORY| cut -d / -f 2)
echo ::set-output name=repo_owner::$(echo $GITHUB_REPOSITORY| cut -d / -f 1)

- uses: actions/setup-node@v2
with:
node-version: 14
- name: Install dependencies
run: yarn install

- name: Run all checks and build
run: yarn run all

- name: SonarCloud Scan
if: matrix.node-version == 14
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=${{ steps.info.outputs.repo_owner }}
-Dsonar.projectKey=${{ steps.info.outputs.repo_name }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14.15.5
v14.18.1
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,29 @@
"README.md"
],
"devDependencies": {
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/exec": "^5.0.0",
"@semantic-release/git": "^9.0.0",
"@semantic-release/github": "^7.2.0",
"@semantic-release/npm": "^7.0.10",
"@semantic-release/release-notes-generator": "^9.0.1",
"@semantic-release/changelog": "^6.0.0",
"@semantic-release/commit-analyzer": "^9.0.1",
"@semantic-release/exec": "^6.0.1",
"@semantic-release/git": "^10.0.0",
"@semantic-release/github": "^8.0.1",
"@semantic-release/npm": "^8.0.0",
"@semantic-release/release-notes-generator": "^10.0.2",
"@types/chalk": "^2.2.0",
"@types/figlet": "^1.2.1",
"@types/jest": "^26.0.15",
"@types/jest": "^27.0.2",
"@types/js-yaml": "^4.0.0",
"@types/node": "^16.10.3",
"@typescript-eslint/parser": "^4.16.1",
"conventional-changelog-conventionalcommits": "^4.5.0",
"eslint": "^7.17.0",
"eslint-plugin-github": "^4.1.1",
"eslint-plugin-jest": "^24.1.3",
"jest": "^26.6.3",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.2.5",
"nyc": "^15.1.0",
"prettier": "2.3.2",
"semantic-release": "^17.3.9",
"ts-jest": "^26.4.4",
"semantic-release": "^18.0.0",
"ts-jest": "^27.0.5",
"ts-node-dev": "^1.1.1",
"typescript": "^4.1.5"
},
Expand Down
3 changes: 2 additions & 1 deletion src/action-docs.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { LineBreakType, getLineBreak } from "./linebreak";
import { load } from "js-yaml";
import { readFileSync } from "fs";
import replaceInFile from "replace-in-file";
import { LineBreakType, getLineBreak } from "./linebreak";

export interface Options {
tocLevel?: number;
Expand Down Expand Up @@ -121,6 +121,7 @@ function generateActionDocs(options: DefaultOptions): ActionMarkdown {
outputs: createMarkdownSection(options, outputMdTable, "Outputs"),
runs: createMarkdownSection(
options,
// eslint-disable-next-line i18n-text/no-en
`This action is an \`${yml.runs.using}\` action.`,
"Runs"
),
Expand Down
4 changes: 2 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env node

import yargs from "yargs";
import { generateActionMarkdownDocs, defaultOptions } from ".";
import { defaultOptions, generateActionMarkdownDocs } from ".";
import chalk from "chalk";
import figlet from "figlet";
import { getLineBreakType } from "./linebreak";
import yargs from "yargs";

const args = yargs.options({
"toc-level": {
Expand Down
Loading