Skip to content

Commit

Permalink
Bump typescript from 4.7.3 to 4.8.3 (#104)
Browse files Browse the repository at this point in the history
* Bump typescript from 4.7.3 to 4.8.3

* Bump @types/jest from 28.1.1 to 29.0.2

* Bump @typescript-eslint/eslint-plugin from 5.27.1 to 5.37.0

* Bump @typescript-eslint/parser from 5.27.1 to 5.37.0

* Bump dotenv from 16.0.1 to 16.0.2

* Bump eslint from 8.17.0 to 8.23.1

* Bump jest from 28.1.1 to 29.0.3

* Bump jest-circus from 28.1.1 to 29.0.3
  • Loading branch information
fabasoad authored Sep 15, 2022
1 parent f5c4c72 commit 5e9dd6b
Show file tree
Hide file tree
Showing 27 changed files with 972 additions and 1,399 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"require-jsdoc": "off",
"semi": "off"
}
}
}
25 changes: 16 additions & 9 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,32 @@ assignees: fabasoad

---

**Describe the bug**
#### Describe the bug

A clear and concise description of what the bug is.

**Steps to Reproduce**
#### Steps to Reproduce

1. Run '...'
2. See error

**Expected behavior**
#### Expected behavior

A clear and concise description of what you expected to happen.

**Actual behavior**
#### Actual behavior

A clear and concise description of what is happening now.

**Screenshots**
#### Screenshots

If applicable, add screenshots to help explain your problem.

**Technical information (please complete the following information):**
- OS: [e.g. Windows 10 Enterprise v.1909 (OS Build 18363.720)]
- `translation-action` version [e.g. 1.4.1]
#### Technical information (please complete the following information)

- OS: [e.g. Windows 10 Enterprise v.1909 (OS Build 18363.720)]
- `translation-action` version [e.g. 1.4.1]

#### Additional context

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ Please check the type of change your PR introduces:
## Other information

<!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
<!-- This document was adapted from the open-source [appium/appium](https://github.com/appium/appium/blob/master/.github/PULL_REQUEST_TEMPLATE.md) repository. -->
<!-- This document was adapted from the open-source [appium/appium](https://github.com/appium/appium/blob/master/.github/PULL_REQUEST_TEMPLATE.md) repository. -->
4 changes: 2 additions & 2 deletions .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Validate MyMemory (Free) translation result
run: |
echo "'${{ matrix.source }}' has been translated to '${{ steps.mymemory_free.outputs.text }}'"
[[ "${{ steps.mymemory_free.outputs.text }}" == "Desempenho" ]] || exit 1;
[[ "${{ steps.mymemory_free.outputs.text }}" == "Live performance" ]] || exit 1;
shell: bash
- uses: ./
id: mymemory_registered
Expand All @@ -51,7 +51,7 @@ jobs:
- name: Validate MyMemory (Registered) translation result
run: |
echo "'${{ matrix.source }}' has been translated to '${{ steps.mymemory_registered.outputs.text }}'"
[[ "${{ steps.mymemory_registered.outputs.text }}" == "Performance" ]] || exit 1;
[[ "${{ steps.mymemory_registered.outputs.text }}" == "Commissione di" ]] || exit 1;
shell: bash
- uses: ./
id: funtranslations
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/security-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@ on:
- 'feature-*'

jobs:
snyk_tests:
name: Snyk
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_API_TOKEN }}
codeql_tests:
name: CodeQL
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Compile
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: yarn install
run: yarn install --ignore-scripts
- name: Lint
run: yarn run lint
- name: Unit tests
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/yaml-lint.yml

This file was deleted.

1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

8 changes: 0 additions & 8 deletions .husky/pre-commit

This file was deleted.

5 changes: 0 additions & 5 deletions .husky/pre-push

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/prepare-commit-msg

This file was deleted.

71 changes: 71 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
default_stages: ["commit"]
exclude: ^(.gitleaks\.toml|dist/.*\.js)$
repos:
- repo: local
hooks:
- id: build
name: Build
entry: yarn run build
language: system
pass_filenames: false
verbose: true
- id: test
name: Unit tests
entry: yarn test
language: system
pass_filenames: false
verbose: true
stages: ["push"]
# Security
- repo: https://github.com/Yelp/detect-secrets
rev: v1.3.0
hooks:
- id: detect-secrets
stages: ["commit", "push"]
- repo: https://github.com/zricethezav/gitleaks
rev: v8.12.0
hooks:
- id: gitleaks
stages: ["commit", "push"]
- repo: https://github.com/fabasoad/pre-commit-snyk
rev: v0.1.0
hooks:
- id: snyk-test
stages: ["push"]
# TypeScript
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.23.1
hooks:
- id: eslint
args: ['--fix']
files: \.[jt]sx?$
types: [file]
exclude: ^dist/.*\.js$
# Markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.2
hooks:
- id: markdownlint
# Yaml
- repo: https://github.com/adrienverge/yamllint
rev: v1.28.0
hooks:
- id: yamllint
args: ["-c", ".yamllint.yml"]
# Other
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-merge-conflict
- id: check-json
- id: detect-private-key
stages: ["commit", "push"]
- id: end-of-file-fixer
- id: mixed-line-ending
args: ["--fix=lf"]
- id: no-commit-to-branch
- id: trailing-whitespace
ci:
autofix_prs: false
skip: [build, eslint, test]
4 changes: 0 additions & 4 deletions .snyk

This file was deleted.

33 changes: 0 additions & 33 deletions .vscode/settings.json

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Yevhen Fabizhevskyi
Copyright (c) 2022 Yevhen Fabizhevskyi

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 Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Translation action

![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/fabasoad/translation-action?include_prereleases) ![Unit Tests](https://github.com/fabasoad/translation-action/workflows/Unit%20Tests/badge.svg) ![Functional Tests](https://github.com/fabasoad/translation-action/workflows/Functional%20Tests/badge.svg) ![YAML Lint](https://github.com/fabasoad/translation-action/workflows/YAML%20Lint/badge.svg) ![Security Tests](https://github.com/fabasoad/translation-action/workflows/Security%20Tests/badge.svg) [![Total alerts](https://img.shields.io/lgtm/alerts/g/fabasoad/translation-action.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fabasoad/translation-action/alerts/) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/fabasoad/translation-action.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fabasoad/translation-action/context:javascript) [![Maintainability](https://api.codeclimate.com/v1/badges/84bb3beceb9503272bc9/maintainability)](https://codeclimate.com/github/fabasoad/translation-action/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/84bb3beceb9503272bc9/test_coverage)](https://codeclimate.com/github/fabasoad/translation-action/test_coverage) [![Known Vulnerabilities](https://snyk.io/test/github/fabasoad/translation-action/badge.svg?targetFile=package.json)](https://snyk.io/test/github/fabasoad/translation-action?targetFile=package.json)
![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/fabasoad/translation-action?include_prereleases) ![Unit Tests](https://github.com/fabasoad/translation-action/workflows/Unit%20Tests/badge.svg) ![Functional Tests](https://github.com/fabasoad/translation-action/workflows/Functional%20Tests/badge.svg) ![Security Tests](https://github.com/fabasoad/translation-action/workflows/Security%20Tests/badge.svg) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/fabasoad/translation-action/main.svg)](https://results.pre-commit.ci/latest/github/fabasoad/translation-action/main) [![Total alerts](https://img.shields.io/lgtm/alerts/g/fabasoad/translation-action.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fabasoad/translation-action/alerts/) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/fabasoad/translation-action.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fabasoad/translation-action/context:javascript) [![Maintainability](https://api.codeclimate.com/v1/badges/84bb3beceb9503272bc9/maintainability)](https://codeclimate.com/github/fabasoad/translation-action/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/84bb3beceb9503272bc9/test_coverage)](https://codeclimate.com/github/fabasoad/translation-action/test_coverage) [![BCH compliance](https://bettercodehub.com/edge/badge/fabasoad/translation-action?branch=main)](https://bettercodehub.com/) [![Known Vulnerabilities](https://snyk.io/test/github/fabasoad/translation-action/badge.svg?targetFile=package.json)](https://snyk.io/test/github/fabasoad/translation-action?targetFile=package.json)

This action translates any text to any language supported by chosen provider. There is a list of providers that can be used for text translation. Please find more details for each provider below.

Expand Down
12 changes: 6 additions & 6 deletions dist/index.js

Large diffs are not rendered by default.

36 changes: 13 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
{
"name": "translation-action",
"version": "1.4.12",
"version": "1.4.13",
"description": "This GitHub action translates any text from any language to any language.",
"main": "dist/index.js",
"scripts": {
"build": "ncc build -m src/index.ts",
"lint:md": "markdownlint --config .markdownlint.yml '**/*.md'",
"lint:es": "eslint --ext ts src",
"lint": "yarn run lint:md && yarn run lint:es",
"postinstall": "yarn husky install",
"security:auth": "snyk auth",
"security:test": "snyk test",
"lint": "eslint --ext ts src",
"postinstall": "pre-commit install --hook-type pre-commit && pre-commit install --hook-type pre-push",
"test": "jest --config=jest.config.json --coverage"
},
"repository": {
Expand All @@ -35,23 +31,17 @@
"yandex-translate": "2.1.3"
},
"devDependencies": {
"@types/jest": "28.1.1",
"@typescript-eslint/eslint-plugin": "5.27.1",
"@typescript-eslint/parser": "5.27.1",
"@types/jest": "29.0.2",
"@typescript-eslint/eslint-plugin": "5.37.0",
"@typescript-eslint/parser": "5.37.0",
"@vercel/ncc": "0.34.0",
"dotenv": "16.0.1",
"eslint": "8.17.0",
"dotenv": "16.0.2",
"eslint": "8.23.1",
"eslint-config-google": "0.14.0",
"git-branch-is": "4.0.0",
"husky": "8.0.1",
"jest": "28.1.1",
"jest-circus": "28.1.1",
"markdownlint-cli": "0.31.1",
"jest": "29.0.3",
"jest-circus": "29.0.3",
"mocha-param": "2.0.1",
"nyc": "15.1.0",
"snyk": "1.947.0",
"ts-jest": "28.0.4",
"typescript": "4.7.3"
},
"snyk": true
"ts-jest": "29.0.1",
"typescript": "4.8.3"
}
}
6 changes: 3 additions & 3 deletions src/__tests__/extract.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import path from 'path';
import extract from '../extract';

describe('extract', () => {
it('should extract text', () => {
test('should extract text', () => {
const text = 'some text';
expect(extract(text)).toEqual(text);
});

it('should extract file content', () => {
test('should extract file content', () => {
expect(extract(path.join(__dirname, 'text.txt')))
.toEqual('Simple text for translation.');
.toEqual('Simple text for translation.\n');
});
});
Loading

0 comments on commit 5e9dd6b

Please sign in to comment.