Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82,155 changes: 27,136 additions & 55,019 deletions dist/index.js

Large diffs are not rendered by default.

22 changes: 0 additions & 22 deletions dist/licenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,28 +71,6 @@ The above copyright notice and this permission notice shall be included in all c

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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 SOFTWARE.

@fastify/busboy
MIT
Copyright Brian White. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
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 SOFTWARE.

asynckit
MIT
The MIT License (MIT)
Expand Down
3 changes: 3 additions & 0 deletions dist/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
20 changes: 18 additions & 2 deletions jest.config.js → jest.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
export default {
preset: 'ts-jest/presets/default-esm',
testEnvironment: 'node',
roots: ['<rootDir>/src'],
testMatch: ['**/__tests__/**/*.test.ts'],
Expand All @@ -22,4 +22,20 @@ module.exports = {
clearMocks: true,
resetMocks: true,
restoreMocks: true,
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
useESM: true,
tsconfig: {
module: 'ES2022',
moduleResolution: 'bundler',
},
},
],
},
};
108 changes: 26 additions & 82 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "datadog-upload-code-coverage-action",
"version": "1.0.0",
"type": "module",
"description": "Fast GitHub Action to upload code coverage files to DataDog",
"main": "dist/index.js",
"scripts": {
Expand All @@ -25,8 +26,8 @@
"author": "Your Name",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/glob": "^0.5.0",
"@actions/core": "^3.0.0",
"@actions/glob": "^0.6.1",
"axios": "^1.6.7",
"form-data": "^4.0.0"
},
Expand Down
56 changes: 56 additions & 0 deletions src/__mocks__/@actions/core.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Manual mock for @actions/core
export const getInput = jest.fn();
export const setOutput = jest.fn();
export const setFailed = jest.fn();
export const info = jest.fn();
export const warning = jest.fn();
export const error = jest.fn();
export const debug = jest.fn();
export const startGroup = jest.fn();
export const endGroup = jest.fn();
export const saveState = jest.fn();
export const getState = jest.fn();
export const group = jest.fn();
export const getBooleanInput = jest.fn();
export const getMultilineInput = jest.fn();
export const setSecret = jest.fn();
export const addPath = jest.fn();
export const exportVariable = jest.fn();
export const setCommandEcho = jest.fn();
export const isDebug = jest.fn();

// Summary and platform exports
export const summary = {
addRaw: jest.fn(),
addEOL: jest.fn(),
addCodeBlock: jest.fn(),
addList: jest.fn(),
addTable: jest.fn(),
addDetails: jest.fn(),
addImage: jest.fn(),
addHeading: jest.fn(),
addSeparator: jest.fn(),
addBreak: jest.fn(),
addQuote: jest.fn(),
addLink: jest.fn(),
clear: jest.fn(),
stringify: jest.fn(),
isEmptyBuffer: jest.fn(),
emptyBuffer: jest.fn(),
filePath: jest.fn(),
wrap: jest.fn(),
write: jest.fn(),
};

export const markdownSummary = summary;

export const toPosixPath = jest.fn((p: string) => p.replace(/\\/g, '/'));
export const toWin32Path = jest.fn((p: string) => p.replace(/\//g, '\\'));
export const toPlatformPath = jest.fn((p: string) => p);

export const platform = {
getDetails: jest.fn(),
isWindows: jest.fn(() => process.platform === 'win32'),
isMacOS: jest.fn(() => process.platform === 'darwin'),
isLinux: jest.fn(() => process.platform === 'linux'),
};
16 changes: 16 additions & 0 deletions src/__mocks__/@actions/glob.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Manual mock for @actions/glob
export const create = jest.fn();
export const hashFiles = jest.fn();

export interface Globber {
getSearchPaths(): string[];
glob(): Promise<string[]>;
globGenerator(): AsyncGenerator<string, void>;
}

export interface GlobOptions {
followSymbolicLinks?: boolean;
implicitDescendants?: boolean;
matchDirectories?: boolean;
omitBrokenSymbolicLinks?: boolean;
}
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "commonjs",
"module": "ES2022",
"lib": ["ES2022"],
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
Expand Down
Loading