Merge branch 'main' into dependabot/github_actions/actions-dependencies-37cd5763f6

This commit is contained in:
Mathew Payne
2025-05-13 09:12:58 +01:00
committed by GitHub
13 changed files with 3906 additions and 2096 deletions
-1
View File
@@ -1 +0,0 @@
dist/
+2
View File
@@ -4,6 +4,8 @@
# For our project, we generate this file through a build process from other source files.
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
name: Check dist/
permissions:
contents: read
on:
push:
+2
View File
@@ -1,4 +1,6 @@
name: "Test"
permissions:
contents: read
on:
pull_request:
workflow_dispatch:
+10 -4
View File
@@ -1,6 +1,12 @@
module.exports = {
export default {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
],
[
'@babel/preset-env',
{
targets: { node: 'current' },
modules: false
}
],
'@babel/preset-typescript'
]
};
Generated Vendored
+298 -379
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+1 -1
View File
@@ -528,7 +528,7 @@ THE SOFTWARE.
@octokit/webhooks
MIT
Copyright (c) 2017 Gregor Martynus
Copyright (c) GitHub 2025 - Licensed as MIT.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Generated Vendored
+3
View File
@@ -0,0 +1,3 @@
{
"type": "module"
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+22
View File
@@ -0,0 +1,22 @@
// eslint.config.js for ESLint v9+ (flat config)
import js from '@eslint/js';
const { configs } = js;
export default [
{
...configs.recommended,
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
{
ignores: [
'dist/',
'coverage/',
'output.json',
'*.d.ts',
'node_modules/',
],
},
];
+13 -21
View File
@@ -1,21 +1,13 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
transform: {
"^.+\\.tsx?$": "ts-jest",
"^.+\\.[t|j]sx?$": "babel-jest", // Use Babel for transforming JS and TS files
"^.+\\.mjs$": "jest-transform-stub", // Use the stub to handle ES modules
},
preset: 'ts-jest',
testEnvironment: 'node',
moduleNameMapper: {
"^octokit$": "<rootDir>/node_modules/octokit/dist-bundle/index.js",
"^@github/dependency-submission-toolkit$": "<rootDir>/node_modules/@github/dependency-submission-toolkit/dist/index.js",
},
extensionsToTreatAsEsm: [".ts"],
transformIgnorePatterns: ["/node_modules/(?!(octokit|\\@github\\/dependency-submission-toolkit)/)"], // Ensure octokit and @github/dependency-submission-toolkit are transformed
globals: {
"ts-jest": {
useESM: true,
},
},
};
export default {
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
transform: {
'^.+\\.ts$': ['babel-jest', { configFile: './babel.config.js' }]
},
moduleNameMapper: {},
verbose: true,
collectCoverage: true,
coverageDirectory: 'coverage',
testMatch: ['**/*.test.ts'],
resolver: undefined,
};
+3540 -1677
View File
File diff suppressed because it is too large Load Diff
+13 -11
View File
@@ -2,11 +2,12 @@
"name": "component-detection-action",
"version": "1.0.0",
"description": "Component detection action",
"main": "index.ts",
"main": "dist/index.js",
"type": "module",
"scripts": {
"lint": "eslint .",
"prepare": "ncc build index.ts -o dist --source-map --license licenses.txt",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"all": "npm run lint && npm run prepare && npm run test"
},
"repository": {
@@ -26,24 +27,25 @@
"homepage": "https://github.com/advanced-security/component-detection-dependency-submission-action#readme",
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^6.0.0",
"@github/dependency-submission-toolkit": "^2.0.4",
"@actions/github": "^6.0.1",
"@github/dependency-submission-toolkit": "^2.0.5",
"cross-fetch": "^4.1.0",
"dotenv": "^16.4.7",
"dotenv": "^16.5.0",
"fs": "^0.0.1-security",
"octokit": "^4.1.2",
"octokit": "^4.1.3",
"tar": "^7.4.3",
"yaml": "^2.7.0"
"yaml": "^2.7.1"
},
"devDependencies": {
"@babel/preset-env": "^7.26.9",
"@babel/preset-typescript": "^7.26.0",
"@babel/preset-env": "^7.27.2",
"@babel/preset-typescript": "^7.27.1",
"@eslint/js": "^9.26.0",
"@types/glob": "^8.1.0",
"@types/jest": "^29.5.14",
"@vercel/ncc": "^0.38.3",
"eslint": "^9.21.0",
"eslint": "^9.26.0",
"jest": "^29.7.0",
"jest-transform-stub": "^2.0.0",
"ts-jest": "^29.2.6"
"ts-jest": "^29.3.2"
}
}