Skip to content

Commit

Permalink
Bump cross-fetch from 4.0.0 to 4.1.0 (#157)
Browse files Browse the repository at this point in the history
## Changelog

- Update license copyright year to 2025

---

Powered by
[FantasticFiasco/action-update-license-year](https://github.com/FantasticFiasco/action-update-license-year)

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: fabasoad <[email protected]>
  • Loading branch information
3 people authored Jan 11, 2025
1 parent 7994df0 commit f413419
Show file tree
Hide file tree
Showing 12 changed files with 408 additions and 394 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ jobs:
contents: read
security-events: write
uses: fabasoad/reusable-workflows/.github/workflows/wf-security-sast.yml@main
with:
code-scanning: true
sca: true
10 changes: 3 additions & 7 deletions .github/workflows/test-providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defaults:

jobs:
test-providers:
name: ${{ matrix.provider }}
name: ${{ matrix.provider }} (${{ matrix.api_key == '' && 'Free' || 'Paid' }})
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
Expand All @@ -34,17 +34,14 @@ jobs:
lang: "en-hr"
source: "Love"
expected: "Ljubav"
api_key: "N_A" # pragma: allowlist secret
- provider: "linguatools"
lang: "en-de"
source: "Love"
expected: "Love"
api_key: "N_A" # pragma: allowlist secret
- provider: "mymemory"
lang: "en|sw"
source: "Love"
expected: "Upendo"
api_key: "N_A" # pragma: allowlist secret
expected: "Mfano"
- provider: "mymemory"
lang: "en|pt"
source: "Love"
Expand All @@ -54,7 +51,6 @@ jobs:
lang: "klingon"
source: "Love"
expected: "Parmaq"
api_key: "N_A" # pragma: allowlist secret
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
Expand All @@ -65,7 +61,7 @@ jobs:
provider: ${{ matrix.provider }}
lang: ${{ matrix.lang }}
source: ${{ matrix.source }}
api_key: "${{ secrets[matrix.api_key] }}"
api_key: "${{ matrix.api_key == '' && '' || secrets[matrix.api_key] }}"
- name: Validate ${{ matrix.provider }} translation result
run: |
echo "'${{ matrix.source }}' has been translated to '${{ steps.result.outputs.text }}'"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update-license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: License

on: # yamllint disable-line rule:truthy
schedule:
# Every January 1st at 14:00 JST
- cron: "0 5 1 1 *"

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ repos:
hooks:
- id: detect-secrets
- repo: https://github.com/gitleaks/gitleaks
rev: v8.21.3
rev: v8.22.1
hooks:
- id: gitleaks
- repo: https://github.com/fabasoad/pre-commit-snyk
Expand Down Expand Up @@ -81,7 +81,7 @@ repos:
stages: ["pre-push"]
# GitHub Actions
- repo: https://github.com/rhysd/actionlint
rev: v1.7.4
rev: v1.7.6
hooks:
- id: actionlint
args: ["-pyflakes="]
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 23.4.0
nodejs 23.6.0
574 changes: 287 additions & 287 deletions .yarn/releases/yarn-4.5.3.cjs → .yarn/releases/yarn-4.6.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: "https://mskelton.dev/yarn-outdated/v2"

yarnPath: .yarn/releases/yarn-4.5.3.cjs
yarnPath: .yarn/releases/yarn-4.6.0.cjs
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-2024 Yevhen Fabizhevskyi
Copyright (c) 2020-2025 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
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ more details for each provider below.

## Inputs

| Name | Required | Description | Default | Possible values |
|--------------------------|----------|--------------------------------------------------------------------------------------------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| source | Yes | Can be text or path to the file for translation | | _&lt;Path&gt;_,_&lt;String&gt;_ |
| Name | Required | Description | Default | Possible values |
|--------------------------|----------|--------------------------------------------------------------------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| source | Yes | Can be text or path to the file for translation | | _&lt;Path&gt;_,_&lt;String&gt;_ |
| provider | Yes | Provider identifier | | [deepl](#deepl), [google](#google), [libretranslate](#libretranslate), [linguatools](#linguatools), [microsoft](#microsoft), [mymemory](#mymemory), [funtranslations](#funtranslations) |
| api_key | No | API key that should be used for chosen [provider](#providers) | `""` | _&lt;String&gt;_ |
| api_additional_parameter | No | Additional parameter for the API. eg the region for Microsoft: `canadacentral` | `""` | _&lt;String&gt;_ |
| lang | Yes | The translation direction. Should be one of the option proposed by chosen [provider](#providers) | | _&lt;String&gt;_ |
| api_key | No | API key that should be used for chosen [provider](#providers) | `""` | _&lt;String&gt;_ |
| api_additional_parameter | No | Additional parameter for the API. eg the region for Microsoft: `canadacentral` | `""` | _&lt;String&gt;_ |
| lang | Yes | The translation direction. Should be one of the option proposed by chosen [provider](#providers) | | _&lt;String&gt;_ |

## Outputs

Expand Down Expand Up @@ -228,3 +228,7 @@ found [here](https://funtranslations.com/api/). Example:
lang: 'klingon'
source: 'Who are you'
```

## Contributions

![Alt](https://repobeats.axiom.co/api/embed/666b4ed5b82273f6ecae26db931e5c9dd71b65b1.svg "Repobeats analytics image")
8 changes: 4 additions & 4 deletions dist/index.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "translation-action",
"version": "3.1.4",
"version": "3.1.5",
"description": "This GitHub action translates any text from any language to any language.",
"main": "dist/index.js",
"scripts": {
Expand All @@ -26,9 +26,9 @@
"homepage": "https://github.com/fabasoad/translation-action#readme",
"dependencies": {
"@actions/core": "1.11.1",
"cross-fetch": "4.0.0",
"cross-fetch": "4.1.0",
"deepl-node": "1.15.0",
"google-translate-api-x": "10.7.1",
"google-translate-api-x": "10.7.2",
"typed-rest-client": "2.1.0"
},
"devDependencies": {
Expand All @@ -40,7 +40,7 @@
"jest-circus": "29.7.0",
"mocha-param": "2.0.1",
"ts-jest": "29.2.5",
"typescript": "5.7.2"
"typescript": "5.7.3"
},
"packageManager": "yarn@4.5.3"
"packageManager": "yarn@4.6.0"
}
Loading

0 comments on commit f413419

Please sign in to comment.