Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot]
4d81c2f489 Bump eslint-plugin-jest from 28.14.0 to 29.0.1
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 28.14.0 to 29.0.1.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v28.14.0...v29.0.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-version: 29.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-20 15:13:30 +00:00
8 changed files with 1161 additions and 592 deletions

5
.eslintignore Normal file
View File

@@ -0,0 +1,5 @@
dist/
lib/
node_modules/
jest.config.js
fix-regex.js

26
.eslintrc.json Normal file
View File

@@ -0,0 +1,26 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "github", "jest", "prettier"],
"extends": [
"plugin:github/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parserOptions": {
"ecmaVersion": 2019,
"sourceType": "module"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
},
"rules": {
"filenames/match-regex": "off",
"github/no-then": "off",
"i18n-text/no-en": "off",
"import/no-namespace": "off"
}
}

View File

@@ -6,7 +6,7 @@ summary: Parse HTTP Content-Type header according to RFC 7231
homepage: https://github.com/fastify/fast-content-type-parse#readme homepage: https://github.com/fastify/fast-content-type-parse#readme
license: other license: other
licenses: licenses:
- sources: LICENSE - sources: LICENSE
text: |- text: |-
MIT License MIT License
@@ -32,6 +32,6 @@ licenses:
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 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 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
- sources: README.md - sources: README.md
text: Licensed under [MIT](./LICENSE). text: Licensed under [MIT](./LICENSE).
notices: [] notices: []

View File

@@ -137,6 +137,7 @@ Using these events ensure that a given issue or pull request, in the workflow's
## Creating a PAT and adding it to your repository ## Creating a PAT and adding it to your repository
- Create a new [personal access token](https://github.com/settings/tokens/new). _See [Creating a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) for more information_ - Create a new [personal access token](https://github.com/settings/tokens/new). _See [Creating a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) for more information_
- For **Tokens (classic)** include the `project` scope; for private repos you will also need `repo` scope. - For **Tokens (classic)** include the `project` scope; for private repos you will also need `repo` scope.
- For **Fine-grained tokens**, you must first select the appropriate _owner_ and associated _repositories_. Then select _Organization permissions -> `projects` `read & write`_, and _Repository permissions -> `issues` `read-only`_ and _`pull requests` `read-only`_. - For **Fine-grained tokens**, you must first select the appropriate _owner_ and associated _repositories_. Then select _Organization permissions -> `projects` `read & write`_, and _Repository permissions -> `issues` `read-only`_ and _`pull requests` `read-only`_.

View File

@@ -1,78 +0,0 @@
import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'
import github from 'eslint-plugin-github'
import jest from 'eslint-plugin-jest'
import globals from 'globals'
export default [
// Ignore patterns
{
ignores: ['dist/**', 'lib/**', 'node_modules/**', '__tests__/fixtures/**', 'eslint.config.mjs'],
},
// Base ESLint recommended rules
eslint.configs.recommended,
// TypeScript ESLint recommended rules
...tseslint.configs.recommended,
// GitHub plugin recommended rules
github.getFlatConfigs().recommended,
// Configuration for CommonJS JavaScript files
{
files: ['**/*.js'],
languageOptions: {
ecmaVersion: 2019,
sourceType: 'script',
globals: {
...globals.node,
...globals.es6,
},
},
rules: {
// Disable specific rules for CommonJS files
'github/filenames-match-regex': 'off',
'import/no-commonjs': 'off',
'@typescript-eslint/no-require-imports': 'off',
'i18n-text/no-en': 'off',
'import/no-namespace': 'off',
'no-implicit-globals': 'off',
'github/no-implicit-buggy-globals': 'off',
},
},
// Configuration for TypeScript files
{
files: ['**/*.ts'],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
ecmaVersion: 2019,
sourceType: 'module',
},
globals: {
...globals.node,
...globals.es6,
},
},
rules: {
// Disable specific rules as in the original config
'github/filenames-match-regex': 'off',
'github/no-then': 'off',
'i18n-text/no-en': 'off',
'import/no-namespace': 'off',
},
},
// Jest-specific configuration
{
files: ['**/*.test.ts', '**/*.test.js', '__tests__/**/*.ts'],
...jest.configs['flat/recommended'],
languageOptions: {
globals: {
...globals.jest,
},
},
},
]

View File

@@ -41,12 +41,12 @@ function fixFile(filePath) {
if (fixedContent !== originalContent) { if (fixedContent !== originalContent) {
fs.writeFileSync(filePath, fixedContent, 'utf8') fs.writeFileSync(filePath, fixedContent, 'utf8')
return {fixed: true, error: null} return { fixed: true, error: null }
} else { } else {
return {fixed: false, error: null} return { fixed: false, error: null }
} }
} catch (error) { } catch (error) {
return {fixed: false, error: error.message} return { fixed: false, error: error.message }
} }
} }
@@ -61,21 +61,21 @@ function fixAllFiles(files = filesToFix) {
for (const filePath of files) { for (const filePath of files) {
const result = fixFile(filePath) const result = fixFile(filePath)
results.push({filePath, ...result}) results.push({ filePath, ...result })
if (result.fixed) { if (result.fixed) {
filesFixed++ filesFixed++
} }
} }
return {filesFixed, results} return { filesFixed, results }
} }
// Main execution when run as script // Main execution when run as script
if (require.main === module) { if (require.main === module) {
process.stdout.write('🔧 Applying regex fix for @octokit/request...\n') process.stdout.write('🔧 Applying regex fix for @octokit/request...\n')
const {filesFixed, results} = fixAllFiles() const { filesFixed, results } = fixAllFiles()
for (const result of results) { for (const result of results) {
if (result.error) { if (result.error) {
@@ -101,5 +101,5 @@ if (require.main === module) {
module.exports = { module.exports = {
applyRegexFix, applyRegexFix,
fixFile, fixFile,
fixAllFiles, fixAllFiles
} }

1466
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -15,24 +15,21 @@
"npm": ">= 8.0.0" "npm": ">= 8.0.0"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.39.1",
"@github/prettier-config": "^0.0.6", "@github/prettier-config": "^0.0.6",
"@types/jest": "^30.0.0", "@types/jest": "^30.0.0",
"@types/node": "^24.10.1", "@types/node": "24.5.2",
"@typescript-eslint/eslint-plugin": "^8.47.0", "@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^8.47.0", "@typescript-eslint/parser": "^7.18.0",
"@vercel/ncc": "^0.38.3", "@vercel/ncc": "^0.38.3",
"concurrently": "^9.2.1", "concurrently": "^9.2.1",
"eslint": "^9.39.1", "eslint": "^8.57.0",
"eslint-plugin-github": "^6.0.0", "eslint-plugin-github": "^5.0.1",
"eslint-plugin-jest": "^29.1.0", "eslint-plugin-jest": "^29.1.0",
"eslint-plugin-prettier": "^5.2.5", "eslint-plugin-prettier": "^5.2.5",
"globals": "^16.5.0",
"jest": "^30.2.0", "jest": "^30.2.0",
"prettier": "3.6.2", "prettier": "3.6.2",
"ts-jest": "^29.4.5", "ts-jest": "^29.4.5",
"typescript": "^5.9.3", "typescript": "^5.5.2"
"typescript-eslint": "^8.47.0"
}, },
"keywords": [ "keywords": [
"actions", "actions",