Skip to content

Commit ed95091

Browse files
authored
Merge pull request #579 from crazy-max/update-dev-deps
update dev dependencies
2 parents f0a4bc3 + 57670b6 commit ed95091

File tree

10 files changed

+1697
-1568
lines changed

10 files changed

+1697
-1568
lines changed

.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

__tests__/meta.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,7 +2770,6 @@ describe('pr', () => {
27702770

27712771
describe('pr-head-sha', () => {
27722772
// prettier-ignore
2773-
// eslint-disable-next-line jest/expect-expect
27742773
test.each([
27752774
[
27762775
'pr01',
@@ -3911,7 +3910,6 @@ describe('raw', () => {
39113910

39123911
describe('json', () => {
39133912
// prettier-ignore
3914-
// eslint-disable-next-line jest/expect-expect
39153913
test.each([
39163914
[
39173915
'json01',
@@ -4275,7 +4273,6 @@ describe('json', () => {
42754273

42764274
describe('bakeFile', () => {
42774275
// prettier-ignore
4278-
// eslint-disable-next-line jest/expect-expect
42794276
test.each([
42804277
[
42814278
'bakeFile01',
@@ -4797,7 +4794,6 @@ describe('bakeFile', () => {
47974794

47984795
describe('bakeFileTagsLabels', () => {
47994796
// prettier-ignore
4800-
// eslint-disable-next-line jest/expect-expect
48014797
test.each([
48024798
[
48034799
'bakeFileTagsLabels01',
@@ -4855,7 +4851,6 @@ describe('bakeFileTagsLabels', () => {
48554851

48564852
describe('sepTags', () => {
48574853
// prettier-ignore
4858-
// eslint-disable-next-line jest/expect-expect
48594854
test.each([
48604855
[
48614856
'sepTags01',
@@ -4888,13 +4883,10 @@ describe('sepTags', () => {
48884883
"user/app:dev,user/app:my,user/app:custom,user/app:tags"
48894884
]
48904885
])('given %p with %p event', async (name: string, envFile: string, inputs: Inputs, expTags: string) => {
4891-
48924886
process.env = dotenv.parse(fs.readFileSync(path.join(__dirname, 'fixtures', envFile)));
48934887

48944888
const toolkit = new Toolkit();
4895-
48964889
const repo = await toolkit.github.repoData();
4897-
48984890
const meta = new Meta({...getInputs(), ...inputs}, await getContext(ContextSource.workflow, toolkit), repo);
48994891

49004892
expect(meta.getTags().join(inputs.sepTags)).toEqual(expTags);

dist/index.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eslint.config.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/* eslint-disable @typescript-eslint/no-require-imports */
2+
const {defineConfig, globalIgnores} = require('eslint/config');
3+
const {fixupConfigRules, fixupPluginRules} = require('@eslint/compat');
4+
const typescriptEslint = require('@typescript-eslint/eslint-plugin');
5+
const jestPlugin = require('eslint-plugin-jest');
6+
const prettier = require('eslint-plugin-prettier');
7+
const globals = require('globals');
8+
const tsParser = require('@typescript-eslint/parser');
9+
const js = require('@eslint/js');
10+
const {FlatCompat} = require('@eslint/eslintrc');
11+
12+
// __dirname and __filename exist natively in CommonJS
13+
const compat = new FlatCompat({
14+
baseDirectory: __dirname,
15+
recommendedConfig: js.configs.recommended,
16+
allConfig: js.configs.all
17+
});
18+
19+
module.exports = defineConfig([
20+
globalIgnores(['dist/**/*', 'coverage/**/*', 'node_modules/**/*']),
21+
{
22+
// prettier-ignore
23+
extends: fixupConfigRules(
24+
compat.extends(
25+
'eslint:recommended',
26+
'plugin:@typescript-eslint/eslint-recommended',
27+
'plugin:@typescript-eslint/recommended',
28+
'plugin:jest/recommended',
29+
'plugin:prettier/recommended'
30+
)
31+
),
32+
33+
plugins: {
34+
'@typescript-eslint': fixupPluginRules(typescriptEslint),
35+
jest: fixupPluginRules(jestPlugin),
36+
prettier: fixupPluginRules(prettier)
37+
},
38+
39+
languageOptions: {
40+
globals: {
41+
...globals.node,
42+
...globals.jest
43+
},
44+
parser: tsParser,
45+
ecmaVersion: 'latest',
46+
sourceType: 'module'
47+
},
48+
49+
rules: {
50+
'@typescript-eslint/no-require-imports': [
51+
'error',
52+
{
53+
allowAsImport: true
54+
}
55+
]
56+
}
57+
}
58+
]);

jest.config.ts renamed to jest.config.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import fs from 'fs';
2-
import os from 'os';
3-
import path from 'path';
1+
/* eslint-disable @typescript-eslint/no-require-imports */
2+
const fs = require('fs');
3+
const os = require('os');
4+
const path = require('path');
45

56
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-metadata-action-'));
67

@@ -9,9 +10,7 @@ process.env = Object.assign({}, process.env, {
910
GITHUB_REPOSITORY: 'docker/metadata-action',
1011
RUNNER_TEMP: path.join(tmpDir, 'runner-temp'),
1112
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache')
12-
}) as {
13-
[key: string]: string;
14-
};
13+
});
1514

1615
module.exports = {
1716
clearMocks: true,

package.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,22 @@
3838
"semver": "^7.7.3"
3939
},
4040
"devDependencies": {
41-
"@types/node": "^20.19.9",
42-
"@types/semver": "^7.7.1",
43-
"@typescript-eslint/eslint-plugin": "^7.18.0",
44-
"@typescript-eslint/parser": "^7.18.0",
45-
"@vercel/ncc": "^0.38.3",
46-
"dotenv": "^16.6.1",
47-
"eslint": "^8.57.1",
48-
"eslint-config-prettier": "^9.1.2",
49-
"eslint-plugin-jest": "^28.14.0",
41+
"@eslint/compat": "^2.0.0",
42+
"@eslint/eslintrc": "^3.3.3",
43+
"@eslint/js": "^9.39.2",
44+
"@types/node": "^20.19.27",
45+
"@typescript-eslint/eslint-plugin": "^8.50.0",
46+
"@typescript-eslint/parser": "^8.50.0",
47+
"@vercel/ncc": "^0.38.4",
48+
"dotenv": "^17.2.3",
49+
"eslint": "^9.39.2",
50+
"eslint-config-prettier": "^10.1.8",
51+
"eslint-plugin-jest": "^29.5.0",
5052
"eslint-plugin-prettier": "^5.5.4",
51-
"jest": "^29.7.0",
52-
"prettier": "^3.6.2",
53-
"ts-jest": "^29.4.1",
53+
"jest": "^30.2.0",
54+
"prettier": "^3.7.4",
55+
"ts-jest": "^29.4.6",
5456
"ts-node": "^10.9.2",
55-
"typescript": "^5.9.2"
57+
"typescript": "^5.9.3"
5658
}
5759
}

src/meta.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ export class Meta {
376376
if (hp.body.length == 1 && hp.body[0].type == 'MustacheStatement') {
377377
return hp.body[0]['path']['parts'].length == 1 && hp.body[0]['path']['parts'][0] == 'raw';
378378
}
379-
} catch (err) {
379+
} catch {
380380
return false;
381381
}
382382
return false;

0 commit comments

Comments
 (0)