Compare commits

...
Author SHA1 Message Date
levaliciousandClaude Opus 5.5 b36ff5cdcd [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
2026-10-12 15:01:22 -04:00
6 changed files with 3904 additions and 9 deletions

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
node_modules/
lib/
audit.json
tests/_temp/
+24
View File
@@ -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
}
+3848
View File
File diff suppressed because it is too large. Load diff
+14 -7
View File
@@ -7,7 +7,7 @@
"actions", "actions",
"io" "io"
], ],
"homepage": "https://github.com/actions/toolkit/tree/main/packages/io", "homepage": "https://git.levk.dev/actions/io",
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",
"main": "lib/io.js", "main": "lib/io.js",
@@ -24,7 +24,7 @@
}, },
"directories": { "directories": {
"lib": "lib", "lib": "lib",
"test": "__tests__" "test": "tests"
}, },
"files": [ "files": [
"lib" "lib"
@@ -34,15 +34,22 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/actions/toolkit.git", "url": "https://git.levk.dev/actions/io.git"
"directory": "packages/io"
}, },
"scripts": { "scripts": {
"audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json",
"test": "echo \"Error: run tests from root\" && exit 1", "test": "jest",
"tsc": "tsc" "tsc": "tsc",
"build": "tsc"
}, },
"bugs": { "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.
+14 -2
View File
@@ -1,6 +1,13 @@
{ {
"extends": "../../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"esModuleInterop": true,
"strict": true,
"declaration": true,
"target": "es6",
"skipLibCheck": true,
"sourceMap": true,
"noImplicitAny": false,
"useUnknownInCatchVariables": false,
"baseUrl": "./", "baseUrl": "./",
"outDir": "./lib", "outDir": "./lib",
"rootDir": "./src", "rootDir": "./src",
@@ -9,5 +16,10 @@
}, },
"include": [ "include": [
"./src" "./src"
],
"exclude": [
"node_modules",
"**/*.test.ts",
"**/__mocks__/*"
] ]
} }