Bump version to 2.32.0

Update Node.js dependencies

Migrate eslint config to a mjs file

Fix imports in tests

Bump to Node.js 20.x in workflows
This commit is contained in:
Shivam Mathur 2024-11-04 08:55:26 +05:30
parent 371ee9d086
commit 7f1cfc01ec
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
11 changed files with 1652 additions and 1190 deletions

View File

@ -1,16 +0,0 @@
{
"env": { "node": true, "jest": true },
"parser": "@typescript-eslint/parser",
"parserOptions": { "ecmaVersion": 2021, "sourceType": "module" },
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:prettier/recommended",
"prettier"
],
"plugins": ["@typescript-eslint", "jest"]
}

View File

@ -33,10 +33,10 @@ jobs:
with:
fetch-depth: 2
- name: Setup Node.js 16.x
- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
- name: Install dependencies
run: npm install

View File

@ -30,7 +30,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '20.x'
registry-url: https://registry.npmjs.org
- name: Install dependencies and add lib

View File

@ -1,5 +1,5 @@
import * as fetch from '../src/fetch';
import nock = require('nock');
import nock from 'nock';
it('checking fetch', async () => {
const host_url = 'https://example.com';

View File

@ -1,5 +1,5 @@
import * as packagist from '../src/packagist';
import nock = require('nock');
import nock from 'nock';
describe('search function', () => {
const mockResponse = {

View File

@ -1,4 +1,4 @@
import fs = require('fs');
import * as fs from 'fs';
import * as tools from '../src/tools';
interface IData {

View File

@ -1,4 +1,4 @@
import fs = require('fs');
import fs from 'fs';
import * as path from 'path';
import * as utils from '../src/utils';

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

51
eslint.config.mjs Normal file
View File

@ -0,0 +1,51 @@
import {fixupConfigRules, fixupPluginRules} from '@eslint/compat';
// eslint-disable-next-line import/no-unresolved
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import jest from 'eslint-plugin-jest';
import globals from 'globals';
// eslint-disable-next-line import/no-unresolved
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import {fileURLToPath} from 'node:url';
import js from '@eslint/js';
import {FlatCompat} from '@eslint/eslintrc';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
export default [
...fixupConfigRules(
compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:prettier/recommended',
'prettier'
)
),
{
plugins: {
'@typescript-eslint': fixupPluginRules(typescriptEslint),
jest
},
languageOptions: {
globals: {
...globals.node,
...globals.jest
},
parser: tsParser,
ecmaVersion: 2021,
sourceType: 'module'
}
}
];

2728
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "setup-php",
"version": "2.31.2",
"version": "2.32.0",
"private": false,
"description": "Setup PHP for use with GitHub Actions",
"main": "lib/install.js",
@ -34,29 +34,32 @@
"author": "shivammathur",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/io": "^1.1.3",
"compare-versions": "^6.1.1"
},
"devDependencies": {
"@types/jest": "^29.5.12",
"@types/node": "^20.14.10",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0",
"@eslint/compat": "^1.2.2",
"@eslint/js": "^9.14.0",
"@types/jest": "^29.5.14",
"@types/node": "^22.8.7",
"@typescript-eslint/eslint-plugin": "^8.12.2",
"@typescript-eslint/parser": "^8.12.2",
"@vercel/ncc": "^0.38.2",
"eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.11.0",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"nock": "^13.5.4",
"nock": "^13.5.5",
"prettier": "^3.3.3",
"simple-git-hooks": "^2.11.1",
"ts-jest": "^29.2.2",
"typescript": "^5.5.3"
"ts-jest": "^29.2.5",
"typescript": "^5.6.3"
},
"bugs": {
"url": "https://github.com/shivammathur/setup-php/issues"