-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Andres Correa Casablanca <[email protected]>
- Loading branch information
Showing
63 changed files
with
1,351 additions
and
3,083 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
# Macos | ||
.DS_Store | ||
|
||
# Caches & Artifacts | ||
.turbo/ | ||
coverage/ | ||
dist/ | ||
# Vendored Packages | ||
node_modules/ | ||
.eslintcache | ||
|
||
# Build Artifacts | ||
.rollup.cache/ | ||
.tsbuildinfo | ||
.turbo/ | ||
.turbo-build.log | ||
tsconfig.tsbuildinfo | ||
dist/ | ||
|
||
# Tests Coverage | ||
coverage/ | ||
|
||
# Local .env files | ||
.env | ||
|
||
# Logs | ||
*.log | ||
|
||
# IDEs | ||
.idea | ||
this.code-workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
set -eu | ||
set -o pipefail | ||
|
||
pnpm turbo lint | ||
pnpm turbo all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
20.8.1 | ||
22.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../.node-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"files": { | ||
"include": [ | ||
"*.json", | ||
"*.jsonc", | ||
"*.js", | ||
"*.mjs", | ||
"*.cjs", | ||
"*.jsx", | ||
"*.ts", | ||
"*.mts", | ||
"*.cts", | ||
"*.tsx", | ||
"*.d.ts", | ||
"*.d.mts", | ||
"*.d.cts", | ||
"*.md", | ||
"*.mdx", | ||
"*.astro", | ||
"*.vue", | ||
"*.svelte" | ||
], | ||
"ignore": ["coverage/**/*", "dist/**/*", "node_modules/**/*"] | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true, | ||
"correctness": { | ||
"all": true, | ||
"noNodejsModules": "off" | ||
}, | ||
"performance": { "all": true }, | ||
"security": { "all": true }, | ||
"style": { "all": true, "useNamingConvention": "off" }, | ||
"suspicious": { "all": true } | ||
} | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"formatWithErrors": false, | ||
"indentStyle": "tab", | ||
"indentWidth": 2, | ||
"lineWidth": 80, | ||
"lineEnding": "lf" | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"enabled": true, | ||
"arrowParentheses": "asNeeded", | ||
"semicolons": "asNeeded", | ||
"trailingCommas": "all", | ||
"quoteProperties": "asNeeded", | ||
"quoteStyle": "single", | ||
"jsxQuoteStyle": "single" | ||
} | ||
}, | ||
"vcs": { | ||
"enabled": true, | ||
"clientKind": "git", | ||
"defaultBranch": "main", | ||
"useIgnoreFile": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "@coderspirit/dev-configs", | ||
"private": true, | ||
"license": "MIT", | ||
"type": "module", | ||
"exports": { | ||
"./biome": "./biome.jsonc", | ||
"./tsconfig": "./tsconfig.json" | ||
}, | ||
"scripts": { | ||
"format": "pnpm biome check --write --files-ignore-unknown=true .", | ||
"format-staged": "biome-check-staged", | ||
"lint": "pnpm biome check --files-ignore-unknown=true ." | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.8.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"compilerOptions": { | ||
/* Visit https://aka.ms/tsconfig to read more about this file */ | ||
|
||
/* Projects */ | ||
"incremental": true, | ||
|
||
/* Language and Environment */ | ||
"target": "es2020", | ||
"lib": ["es2020", "DOM", "DOM.Iterable"], | ||
|
||
/* Modules */ | ||
"module": "es2020", | ||
"moduleResolution": "Bundler", | ||
"allowArbitraryExtensions": true, | ||
"allowImportingTsExtensions": true, | ||
"resolvePackageJsonExports": true, | ||
"resolvePackageJsonImports": true, | ||
"resolveJsonModule": true, | ||
|
||
/* JavaScript Support */ | ||
"allowJs": false, | ||
"checkJs": false, | ||
|
||
/* Emit */ | ||
"noEmit": true, | ||
"tsBuildInfoFile": ".tsbuildinfo", | ||
|
||
/* Interop Constraints */ | ||
"isolatedModules": true, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
|
||
/* Declarations */ | ||
"declaration": false, | ||
"isolatedDeclarations": false, | ||
|
||
/* Type Checking */ | ||
"strict": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"exactOptionalPropertyTypes": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noUncheckedIndexedAccess": true, | ||
"noImplicitOverride": true, | ||
"noPropertyAccessFromIndexSignature": true, | ||
|
||
/* Completeness */ | ||
"skipLibCheck": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../.node-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": ["@coderspirit/dev-configs/biome"], | ||
"files": { | ||
"ignore": [".turbo/**/*", "coverage-unit/**/*", "node_modules/**/*"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "@coderspirit/internal-tools", | ||
"private": true, | ||
"type": "module", | ||
"bin": { | ||
"biome-check-staged": "./src/biome-check-staged.ts" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "^1.8.3", | ||
"@coderspirit/dev-configs": "workspace:*" | ||
}, | ||
"scripts": { | ||
"format": "pnpm biome check --write --files-ignore-unknown=true .", | ||
"format-staged": "biome-check-staged", | ||
"lint": "pnpm biome check --files-ignore-unknown=true ." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env -S deno run --no-config --allow-env --allow-read --allow-sys --allow-run | ||
import process from 'node:process' | ||
import { $ } from 'npm:[email protected]' | ||
|
||
const JSON_EXT = 'json|jsonc' | ||
const JS_EXT = 'js|mjs|cjs|jsx' | ||
const TS_EXT = 'ts|mts|cts|tsx|d.ts' | ||
const MARKUP_EXT = 'md|mdx|astro|vue|svelte' | ||
const BIOME_EXTENSIONS = `(${JSON_EXT}|${JS_EXT}|${TS_EXT}|${MARKUP_EXT})` | ||
|
||
const extsRegex = new RegExp(BIOME_EXTENSIONS) | ||
|
||
const runGitDiffStaged = async (): Promise<string[]> => { | ||
return ( | ||
await $`git diff --staged --relative --name-only --diff-filter=ACMR` | ||
).lines() | ||
} | ||
|
||
export const main = async () => { | ||
const stagedFiles = (await runGitDiffStaged()).filter(file => | ||
extsRegex.test(file), | ||
) | ||
|
||
if (stagedFiles.length === 0) { | ||
return | ||
} | ||
|
||
const processOutput = | ||
await $`pnpm biome check --write --no-errors-on-unmatched --files-ignore-unknown=true ${stagedFiles}`.stdio( | ||
'inherit', | ||
'inherit', | ||
'inherit', | ||
) | ||
|
||
if (processOutput.exitCode !== null && processOutput.exitCode !== 0) { | ||
process.exit(processOutput.exitCode) | ||
} | ||
|
||
await $`git add ${stagedFiles}` | ||
} | ||
|
||
try { | ||
await main() | ||
} catch (err) { | ||
console.error(err) | ||
process.exit(1) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../.node-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"extends": ["@coderspirit/dev-configs/biome"], | ||
"overrides": [ | ||
{ | ||
"include": ["*.ts", "*.mts", "*.cts", "*.tsx"], | ||
"linter": { | ||
"rules": { | ||
"complexity": { "useLiteralKeys": "off" } | ||
} | ||
} | ||
}, | ||
{ | ||
"include": ["*.test.ts", "*.test.mts"], | ||
"linter": { | ||
"rules": { | ||
"style": { "noParameterProperties": "off" } | ||
} | ||
} | ||
}, | ||
{ | ||
"include": ["rollup.config.mjs", "vitest.config.mts"], | ||
"linter": { | ||
"rules": { | ||
"style": { "noDefaultExport": "off" } | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,22 +2,14 @@ | |
"name": "@coderspirit/lambda-ioc", | ||
"version": "2.2.1", | ||
"description": "Super type safe dependency injection 💉 for TypeScript", | ||
"keywords": [ | ||
"typescript", | ||
"functional", | ||
"ioc", | ||
"di", | ||
"dependency injection" | ||
], | ||
"keywords": ["typescript", "functional", "ioc", "di", "dependency injection"], | ||
"author": "Andres Correa Casablanca <[email protected]>", | ||
"private": false, | ||
"license": "MIT", | ||
"main": "./dist/main.cjs", | ||
"module": "./dist/main.mjs", | ||
"types": "./dist/main.d.cts", | ||
"files": [ | ||
"dist" | ||
], | ||
"files": ["dist"], | ||
"exports": { | ||
"import": { | ||
"types": "./dist/main.d.mts", | ||
|
@@ -29,18 +21,31 @@ | |
} | ||
}, | ||
"scripts": { | ||
"build": "rm -rf dist && rollup --config rollup.config.prod.mjs", | ||
"lint:_all": "pnpm run lint:tsc && pnpm run lint:biome && pnpm run lint:publint", | ||
"lint:biome": "biome lint .", | ||
"build": "rm -rf dist/* && rollup --config rollup.config.mjs", | ||
"format": "pnpm biome check --write --files-ignore-unknown=true .", | ||
"format-staged": "biome-check-staged", | ||
"lint": "pnpm lint:biome", | ||
"lint:biome": "pnpm biome check --files-ignore-unknown=true .", | ||
"lint:publint": "publint", | ||
"lint:tsc": "tsc", | ||
"test": "vitest run", | ||
"prepublishOnly": "pnpm run build" | ||
"prepublishOnly": "turbo lint && turbo build", | ||
"test": "vitest -c vitest.config.mts run", | ||
"test:cov": "vitest -c vitest.config.mts run --coverage", | ||
"typecheck": "tsc --incremental true --tsBuildInfoFile .tsbuildinfo --noEmit -p ./tsconfig.json" | ||
}, | ||
"devDependencies": { | ||
"@coderspirit/eslint-config": "^2.0.0", | ||
"@arethetypeswrong/cli": "^0.15.4", | ||
"@biomejs/biome": "1.8.3", | ||
"@coderspirit/dev-configs": "workspace:*", | ||
"@coderspirit/internal-tools": "workspace:*", | ||
"get-tsconfig": "^4.7.6", | ||
"publint": "^0.2.9", | ||
"rollup": "^4.20.0", | ||
"rollup-plugin-dts": "^6.1.1", | ||
"rollup-plugin-esbuild": "^6.1.1", | ||
"tslib": "^2.6.3", | ||
"turbo": "^2.0.12", | ||
"typescript": "^5.5.4", | ||
"vitest": "^1.6.0" | ||
"vitest": "^2.0.5" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
|
Oops, something went wrong.