Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #177 from technote-space/release/next-v6.0.1
Browse files Browse the repository at this point in the history
release: v6.1.0
  • Loading branch information
technote-space committed Jun 20, 2022
2 parents d9dbc02 + 69ecc17 commit ad9e929
Show file tree
Hide file tree
Showing 20 changed files with 2,147 additions and 2,846 deletions.
51 changes: 9 additions & 42 deletions .eslintrc
Expand Up @@ -5,7 +5,8 @@
"plugin:@typescript-eslint/eslint-recommended"
],
"plugins": [
"@typescript-eslint"
"@typescript-eslint",
"import"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand All @@ -30,29 +31,6 @@
"properties": "always"
}
],
"require-jsdoc": [
"error",
{
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true
}
}
],
"valid-jsdoc": [
"error",
{
"requireReturn": false,
"preferType": {
"String": "string",
"Object": "object",
"Number": "number",
"Function": "function",
"Void": "void"
}
}
],
"quotes": [
"error",
"single",
Expand All @@ -71,12 +49,6 @@
}
}
],
"no-magic-numbers": [
"error",
{
"ignoreArrayIndexes": true
}
],
"eqeqeq": "error",
"block-scoped-var": "error",
"complexity": [
Expand All @@ -85,7 +57,6 @@
"maximum": 20
}
],
"curly": "error",
"default-case": "error",
"dot-location": [
"error",
Expand All @@ -102,16 +73,6 @@
"after": true
}
],
"id-length": [
"error",
{
"min": 2,
"properties": "never",
"exceptions": [
"$"
]
}
],
"indent": [
"error",
2,
Expand Down Expand Up @@ -144,6 +105,12 @@
],
"semi": [
"error"
]
],
"sort-imports": 0,
"import/order": [2, {
"groups": ["type", "builtin", "external", "internal", "parent", "sibling", "index", "object"],
"alphabetize": { "order": "asc", "caseInsensitive": true }
}],
"@typescript-eslint/no-non-null-assertion": "off"
}
}
14 changes: 7 additions & 7 deletions action.yml
Expand Up @@ -9,11 +9,11 @@ inputs:
GITHUB_TOKEN:
description: Secret GitHub API token used to make API requests.
default: ${{ github.token }}
required: true
required: false
DOT:
description: Dot.
default: '...'
required: true
required: false
BASE:
description: base
required: false
Expand All @@ -23,18 +23,18 @@ inputs:
DIFF_FILTER:
description: Diff filter.
default: 'AMRC'
required: true
required: false
FORMAT:
description: Output format (text or json)
default: text
required: true
required: false
ESCAPE_JSON:
description: Whether to escape when json format.
required: false
SEPARATOR:
description: Separator of diffs.
default: ' '
required: true
required: false
PATTERNS:
description: Target file pattern.
required: false
Expand Down Expand Up @@ -147,5 +147,5 @@ branding:
color: 'orange'

runs:
using: node12
main: dist/index.js
using: node16
main: lib/main.js
12 changes: 0 additions & 12 deletions jest.config.js

This file was deleted.

3 changes: 0 additions & 3 deletions jest.setup.ts

This file was deleted.

70 changes: 37 additions & 33 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "@technote-space/get-diff-action",
"version": "6.0.1",
"version": "6.1.0",
"description": "GitHub actions to get git diff.",
"keywords": [
"github",
Expand All @@ -25,45 +25,49 @@
"action.yml"
],
"scripts": {
"build": "tsc && yarn ncc build lib/main.js && rm -rf lib",
"cover": "jest --coverage",
"build": "rm -rdf lib && rollup -c",
"cover": "vitest run --coverage",
"postinstall": "[ -n \"$CI\" ] || [ ! -f node_modules/.bin/husky ] || husky install",
"lint": "eslint 'src/**/*.ts' '__tests__/**/*.ts' --cache",
"lint:fix": "eslint --fix 'src/**/*.ts' '__tests__/**/*.ts'",
"lint": "eslint 'src/**/*.ts' --cache",
"lint:fix": "eslint --fix 'src/**/*.ts'",
"prepublishOnly": "[ -n \"$CI\" ] || [ ! -f node_modules/.bin/pinst ] || pinst --disable",
"postpublish": "[ -n \"$CI\" ] || [ ! -f node_modules/.bin/pinst ] || pinst --enable",
"release": "yarn release-ga --test",
"test": "yarn lint && yarn cover",
"test": "yarn lint && yarn typecheck && yarn cover",
"typecheck": "tsc --noEmit",
"update": "npm_config_yes=true npx npm-check-updates -u --timeout 100000 && yarn install && yarn upgrade && yarn audit"
},
"dependencies": {
"@actions/core": "^1.6.0",
"@actions/github": "^5.0.0",
"@technote-space/filter-github-action": "^0.5.54",
"@technote-space/github-action-helper": "^5.2.27",
"@technote-space/github-action-log-helper": "^0.1.46",
"multimatch": "^6.0.0"
},
"devDependencies": {
"@babel/preset-env": "^7.16.7",
"@commitlint/cli": "^16.0.1",
"@commitlint/config-conventional": "^16.0.0",
"@technote-space/github-action-test-helper": "^0.7.35",
"@technote-space/release-github-actions-cli": "^1.8.9",
"@types/jest": "^27.4.0",
"@types/node": "^17.0.8",
"@typescript-eslint/eslint-plugin": "^5.9.0",
"@typescript-eslint/parser": "^5.9.0",
"@vercel/ncc": "^0.33.1",
"eslint": "^8.6.0",
"husky": "^7.0.4",
"jest": "^27.4.6",
"jest-circus": "^27.4.6",
"lint-staged": "^12.1.5",
"nock": "^13.2.1",
"pinst": "^2.1.6",
"ts-jest": "^27.1.2",
"typescript": "^4.5.4"
"@actions/core": "^1.9.0",
"@actions/github": "^5.0.3",
"@babel/preset-env": "^7.18.2",
"@commitlint/cli": "^17.0.2",
"@commitlint/config-conventional": "^17.0.2",
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-typescript": "^8.3.3",
"@sindresorhus/tsconfig": "^3.0.1",
"@technote-space/filter-github-action": "^0.6.2",
"@technote-space/github-action-helper": "^5.3.7",
"@technote-space/github-action-log-helper": "^0.2.5",
"@technote-space/github-action-test-helper": "^0.9.7",
"@technote-space/release-github-actions-cli": "^1.9.0",
"@types/node": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.28.0",
"@typescript-eslint/parser": "^5.28.0",
"@vercel/ncc": "^0.34.0",
"c8": "^7.11.3",
"eslint": "^8.18.0",
"eslint-plugin-import": "^2.26.0",
"husky": "^8.0.1",
"lint-staged": "^13.0.2",
"multimatch": "^6.0.0",
"nock": "^13.2.7",
"pinst": "^3.0.0",
"rollup": "^2.75.7",
"typescript": "^4.7.4",
"vitest": "^0.15.1"
},
"publishConfig": {
"access": "public"
Expand Down
18 changes: 18 additions & 0 deletions rollup.config.js
@@ -0,0 +1,18 @@
import pluginCommonjs from '@rollup/plugin-commonjs';
import pluginJson from '@rollup/plugin-json';
import pluginNodeResolve from '@rollup/plugin-node-resolve';
import pluginTypescript from '@rollup/plugin-typescript';

export default {
input: 'src/main.ts',
output: {
file: 'lib/main.js',
format: 'cjs',
},
plugins: [
pluginTypescript(),
pluginNodeResolve(),
pluginCommonjs(),
pluginJson(),
],
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions src/main.ts
@@ -1,11 +1,11 @@
import {resolve} from 'path';
import {setFailed} from '@actions/core';
import {Context} from '@actions/github/lib/context';
import {isTargetEvent} from '@technote-space/filter-github-action';
import {ContextHelper} from '@technote-space/github-action-helper';
import {Logger} from '@technote-space/github-action-log-helper';
import {execute} from './process';
import {TARGET_EVENTS} from './constant';
import { resolve } from 'path';
import { setFailed } from '@actions/core';
import { Context } from '@actions/github/lib/context';
import { isTargetEvent } from '@technote-space/filter-github-action';
import { ContextHelper } from '@technote-space/github-action-helper';
import { Logger } from '@technote-space/github-action-log-helper';
import { TARGET_EVENTS } from './constant';
import { execute } from './process';

const run = async(): Promise<void> => {
const logger = new Logger();
Expand Down

0 comments on commit ad9e929

Please sign in to comment.