[LevK]: Build and test as a standalone package
Split out of actions/toolkit (packages/io, history kept by filter-repo). Brings the 2024 [LevK] packaging edits forward onto current upstream: - tsconfig.json: the monorepo root's compiler options inlined, no extends - jest.config.cjs: the root's ts-jest transform, rooted at tests/ (isolatedModules: ESM lib/ and sources run through CommonJS) - __tests__/ -> tests/ - package.json: test = jest, build = tsc; jest/ts-jest/typescript as devDependencies; repository, homepage, bugs on git.levk.dev - .gitignore: node_modules/, lib/, audit.json, tests/_temp/ Not carried over from 2024: version reset to 1.0.0 (dependents' ranges need upstream's numbering) and the Unlicense field (the code is MIT). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UHXzGrsxfkGk8LmwrBbHNZ
This commit is contained in:
1 parent
9f91c0c628
commit
b36ff5cdcd
6 files changed
+3903
-8
No files matched your search
@@ -0,0 +1,4 @@
|
||||
node_modules/
|
||||
lib/
|
||||
audit.json
|
||||
tests/_temp/
|
||||
@@ -0,0 +1,24 @@
|
||||
/** @type {import('jest').Config} */
|
||||
module.exports = {
|
||||
clearMocks: true,
|
||||
moduleFileExtensions: ['js', 'ts'],
|
||||
testEnvironment: 'node',
|
||||
roots: ['<rootDir>/tests'],
|
||||
testMatch: ['**/*.test.ts'],
|
||||
moduleNameMapper: {
|
||||
'^(\\.{1,2}/.*)\\.js$': '$1'
|
||||
},
|
||||
transform: {
|
||||
'^.+\\.(ts|js)$': ['ts-jest', {
|
||||
diagnostics: {warnOnly: true},
|
||||
tsconfig: {
|
||||
allowJs: true,
|
||||
isolatedModules: true,
|
||||
esModuleInterop: true,
|
||||
module: 'commonjs',
|
||||
moduleResolution: 'node'
|
||||
}
|
||||
}]
|
||||
},
|
||||
verbose: true
|
||||
}
|
||||
Generated
+3848
File diff suppressed because it is too large.
Load diff
+14
-7
@@ -7,7 +7,7 @@
|
||||
"actions",
|
||||
"io"
|
||||
],
|
||||
"homepage": "https://github.com/actions/toolkit/tree/main/packages/io",
|
||||
"homepage": "https://git.levk.dev/actions/io",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"main": "lib/io.js",
|
||||
@@ -24,7 +24,7 @@
|
||||
},
|
||||
"directories": {
|
||||
"lib": "lib",
|
||||
"test": "__tests__"
|
||||
"test": "tests"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
@@ -34,15 +34,22 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/actions/toolkit.git",
|
||||
"directory": "packages/io"
|
||||
"url": "https://git.levk.dev/actions/io.git"
|
||||
},
|
||||
"scripts": {
|
||||
"audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json",
|
||||
"test": "echo \"Error: run tests from root\" && exit 1",
|
||||
"tsc": "tsc"
|
||||
"test": "jest",
|
||||
"tsc": "tsc",
|
||||
"build": "tsc"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/actions/toolkit/issues"
|
||||
"url": "https://git.levk.dev/actions/io/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.4",
|
||||
"@types/node": "^24.1.0",
|
||||
"jest": "^29.6.4",
|
||||
"ts-jest": "^29.1.1",
|
||||
"typescript": "^5.2.2"
|
||||
}
|
||||
}
|
||||
File renamed without changes.
+13
-1
@@ -1,6 +1,13 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"esModuleInterop": true,
|
||||
"strict": true,
|
||||
"declaration": true,
|
||||
"target": "es6",
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
"noImplicitAny": false,
|
||||
"useUnknownInCatchVariables": false,
|
||||
"baseUrl": "./",
|
||||
"outDir": "./lib",
|
||||
"rootDir": "./src",
|
||||
@@ -9,5 +16,10 @@
|
||||
},
|
||||
"include": [
|
||||
"./src"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"**/*.test.ts",
|
||||
"**/__mocks__/*"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user