Skip to content

Commit

Permalink
Merge pull request #47 from inversify/chore/add-core-package
Browse files Browse the repository at this point in the history
Add core package
  • Loading branch information
notaphplover authored Oct 25, 2024
2 parents ea35fdb + a464187 commit 261f9ff
Show file tree
Hide file tree
Showing 16 changed files with 183 additions and 0 deletions.
6 changes: 6 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ coverage:
'@inversifyjs/common':
flags:
- '@inversifyjs/common'
'@inversifyjs/core':
flags:
- '@inversifyjs/core'
'@inversifyjs/reflect-metadata-utils':
flags:
- '@inversifyjs/reflect-metadata-utils'
flags:
'@inversifyjs/common':
paths:
- packages/container/libraries/common/
'@inversifyjs/core':
paths:
- packages/container/libraries/core/
'@inversifyjs/reflect-metadata-utils':
paths:
- packages/foundation/libraries/reflect-metadata-utils
19 changes: 19 additions & 0 deletions packages/container/libraries/core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Typescript compiled files
/lib/**

/tsconfig.tsbuildinfo
/tsconfig.cjs.tsbuildinfo
/tsconfig.esm.tsbuildinfo

# Test coverage report
/coverage

# Test mutation report
/reports

# node modules
/node_modules/

# Turborepo files
.turbo/

9 changes: 9 additions & 0 deletions packages/container/libraries/core/.lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"*.js": [
"prettier --write"
],
"*.ts": [
"prettier --write",
"eslint"
]
}
17 changes: 17 additions & 0 deletions packages/container/libraries/core/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
**/*.spec.js
**/*.spec.js.map
**/*.ts
!lib/**/*.d.ts
lib/**/*.spec.d.ts

.lintstagedrc.json
eslint.config.mjs
jest.config.mjs
jest.config.stryker.mjs
jest.js.config.mjs
prettier.config.mjs
stryker.config.mjs
tsconfig.json
tsconfig.cjs.json
tsconfig.esm.json
tsconfig.tsbuildinfo
6 changes: 6 additions & 0 deletions packages/container/libraries/core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[![Test coverage](https://codecov.io/gh/inversify/monorepo/branch/main/graph/badge.svg?flag=%40inversifyjs%2Fcore)](https://codecov.io/gh/inversify/monorepo/branch/main/graph/badge.svg?flag=%40inversifyjs%2Fcore)
[![npm version](https://img.shields.io/github/package-json/v/inversify/monorepo?filename=packages%2Fcontainer%2Flibraries%2Fcore%2Fpackage.json&style=plastic)](https://www.npmjs.com/package/@inversifyjs/core)

# @inversifyjs/core

Inversify monorepo core modules.
3 changes: 3 additions & 0 deletions packages/container/libraries/core/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import myconfig from '@inversifyjs/foundation-eslint-config';

export default [...myconfig];
3 changes: 3 additions & 0 deletions packages/container/libraries/core/jest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { tsGlobalConfig } from '@inversifyjs/foundation-jest-config';

export default tsGlobalConfig;
9 changes: 9 additions & 0 deletions packages/container/libraries/core/jest.config.stryker.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { getJestTsProjectConfig } from '@inversifyjs/foundation-jest-config';

const tsGlobalConfig = getJestTsProjectConfig(
'All',
['/node_modules', '.int.spec.ts'],
'.spec.ts',
);

export default tsGlobalConfig;
3 changes: 3 additions & 0 deletions packages/container/libraries/core/jest.js.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { jsGlobalConfig } from '@inversifyjs/foundation-jest-config';

export default jsGlobalConfig;
77 changes: 77 additions & 0 deletions packages/container/libraries/core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"author": "Roberto Pintos López",
"bugs": {
"url": "https://github.com/inversify/monorepo/issues"
},
"description": "InversifyJs core package",
"devDependencies": {
"@eslint/js": "9.13.0",
"@jest/globals": "29.7.0",
"@stryker-mutator/core": "8.6.0",
"@stryker-mutator/jest-runner": "8.6.0",
"@stryker-mutator/typescript-checker": "8.6.0",
"@types/node": "20.17.1",
"@typescript-eslint/eslint-plugin": "8.11.0",
"@typescript-eslint/parser": "8.11.0",
"jest": "29.7.0",
"prettier": "3.3.3",
"rimraf": "6.0.1",
"ts-jest": "29.2.5",
"ts-node": "10.9.2",
"typescript": "5.6.3"
},
"devEngines": {
"node": "^20.18.0",
"pnpm": "^9.12.1"
},
"homepage": "https://inversify.io",
"keywords": [
"dependency injection",
"dependency inversion",
"di",
"inversion of control container",
"ioc",
"javascript",
"node",
"typescript"
],
"license": "MIT",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"exports": {
".": {
"import": "./lib/esm/index.js",
"require": "./lib/cjs/index.js"
}
},
"name": "@inversifyjs/core",
"os": [
"darwin",
"linux"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/inversify/monorepo.git"
},
"scripts": {
"build": "pnpm run build:cjs && pnpm run build:esm",
"build:cjs": "tsc --build tsconfig.cjs.json && pnpm exec foundation-ts-package-cjs ./lib/cjs",
"build:esm": "tsc --build tsconfig.esm.json && pnpm exec foundation-ts-package-esm ./lib/esm",
"build:clean": "rimraf lib",
"format": "prettier --write ./src/**/*.ts",
"lint": "eslint ./src",
"prebuild": "pnpm run build:clean",
"test": "jest --config=jest.config.mjs --runInBand",
"test:integration:js": "pnpm run test:js --selectProjects Integration",
"test:js": "jest --config=jest.js.config.mjs --runInBand",
"test:js:coverage": "pnpm run test:unit:js --coverage",
"test:mutation": "stryker run",
"test:uncommitted": "pnpm run test --changedSince=HEAD",
"test:unit:js": "pnpm run test:js --selectProjects Unit"
},
"sideEffects": false,
"version": "1.0.0"
}
3 changes: 3 additions & 0 deletions packages/container/libraries/core/prettier.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from '@inversifyjs/foundation-prettier-config';

export default config;
1 change: 1 addition & 0 deletions packages/container/libraries/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
3 changes: 3 additions & 0 deletions packages/container/libraries/core/stryker.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from '@inversifyjs/foundation-stryker-config';

export default config;
10 changes: 10 additions & 0 deletions packages/container/libraries/core/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "@inversifyjs/foundation-typescript-config/tsconfig.base.cjs.json",
"compilerOptions": {
"outDir": "./lib/cjs",
"rootDir": "./src",
"tsBuildInfoFile": "tsconfig.cjs.tsbuildinfo"
},
"include": ["src"]
}
10 changes: 10 additions & 0 deletions packages/container/libraries/core/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "@inversifyjs/foundation-typescript-config/tsconfig.base.esm.json",
"compilerOptions": {
"outDir": "./lib/esm",
"rootDir": "./src",
"tsBuildInfoFile": "tsconfig.esm.tsbuildinfo"
},
"include": ["src"]
}
4 changes: 4 additions & 0 deletions packages/container/libraries/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "./tsconfig.esm.json"
}

0 comments on commit 261f9ff

Please sign in to comment.