Skip to content

Commit

Permalink
Merge pull request #322 from inversify/chore/clean-dependencies
Browse files Browse the repository at this point in the history
Clean dependencies
  • Loading branch information
notaphplover authored Jan 18, 2025
2 parents 23ca7fe + 48955a1 commit 724672f
Show file tree
Hide file tree
Showing 21 changed files with 66 additions and 44 deletions.
47 changes: 47 additions & 0 deletions knip.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { KnipConfig } from "knip";

type RecordValues<T> = T extends Record<any, infer U> ? U : never;

type WorkspaceProjectConfig = RecordValues<Required<KnipConfig["workspaces"]>>;

const defaultWorkspaceProjectConfig: WorkspaceProjectConfig = {
entry: [
"{index,cli,main}.{js,cjs,mjs,jsx,ts,cts,mts,tsx}",
"src/{index,cli,main}.{js,cjs,mjs,jsx,ts,cts,mts,tsx}",
],
project: [
"**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}!",
"!jest.config.stryker.mjs",
"!**/__mocks__",
],
};

export default {
workspaces: {
".": {
entry: ["config/commitlint/commitlint.config.js"],
project: [],
},
"packages/container/libraries/*": defaultWorkspaceProjectConfig,
"packages/container/tools/*": defaultWorkspaceProjectConfig,
"packages/docs/services/*": defaultWorkspaceProjectConfig,
"packages/docs/tools/inversify-code-examples": {
entry: ["src/examples/**/*.ts", "src/scripts/generateExamples.mts"],
project: defaultWorkspaceProjectConfig.project,
},
"packages/docs/tools/*": defaultWorkspaceProjectConfig,
"packages/foundation/libraries/*": defaultWorkspaceProjectConfig,
"packages/foundation/tools/*": defaultWorkspaceProjectConfig,
"packages/container/tools/e2e-tests": {
entry: [
"src/*/parameters/*.ts",
"src/*/step-definitions/*.ts",
"src/app/hooks/*.ts",
],
project: [
...(defaultWorkspaceProjectConfig.project as string[]),
"!config/*",
],
},
},
} satisfies KnipConfig;
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
"@commitlint/cli": "19.6.1",
"@commitlint/config-conventional": "19.6.0",
"@commitlint/prompt-cli": "19.7.0",
"@inversifyjs/foundation-prettier-config": "workspace:*",
"@inversifyjs/foundation-eslint-config": "workspace:*",
"@inversifyjs/foundation-jest-config": "workspace:*",
"@inversifyjs/foundation-prettier-config": "workspace:*",
"@inversifyjs/foundation-rollup-config": "workspace:*",
"@inversifyjs/foundation-scripts": "workspace:*",
"@inversifyjs/foundation-stryker-config": "workspace:*",
"@inversifyjs/foundation-typescript-config": "workspace:*",
"husky": "9.1.7",
"knip": "5.42.2",
"lint-staged": "15.4.1",
"turbo": "2.3.3"
},
Expand All @@ -34,6 +35,7 @@
"build": "turbo run build",
"commit": "commit",
"format": "turbo run format",
"knip": "knip",
"lint": "turbo run lint",
"prepare": "husky && turbo telemetry disable",
"prerelease": "pnpm run build",
Expand Down
4 changes: 0 additions & 4 deletions packages/container/libraries/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,18 @@
},
"description": "InversifyJs common utils",
"devDependencies": {
"@eslint/js": "9.18.0",
"@jest/globals": "29.7.0",
"@stryker-mutator/core": "8.7.1",
"@stryker-mutator/jest-runner": "8.7.1",
"@stryker-mutator/typescript-checker": "8.7.1",
"@types/node": "22.10.7",
"@typescript-eslint/eslint-plugin": "8.20.0",
"@typescript-eslint/parser": "8.20.0",
"eslint": "9.18.0",
"jest": "29.7.0",
"prettier": "3.4.2",
"rimraf": "6.0.1",
"rollup": "4.30.1",
"ts-loader": "9.5.2",
"ts-jest": "29.2.5",
"ts-node": "10.9.2",
"tslib": "2.8.1",
"typescript": "5.7.3"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ServiceIdentifier } from './ServiceIdentifier';

export const islazyServiceIdentifierSymbol: unique symbol = Symbol.for(
const islazyServiceIdentifierSymbol: unique symbol = Symbol.for(
'@inversifyjs/common/islazyServiceIdentifier',
);

Expand Down
4 changes: 0 additions & 4 deletions packages/container/libraries/container/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,18 @@
"@inversifyjs/reflect-metadata-utils": "workspace:*"
},
"devDependencies": {
"@eslint/js": "9.18.0",
"@jest/globals": "29.7.0",
"@stryker-mutator/core": "8.7.1",
"@stryker-mutator/jest-runner": "8.7.1",
"@stryker-mutator/typescript-checker": "8.7.1",
"@types/node": "22.10.7",
"@typescript-eslint/eslint-plugin": "8.20.0",
"@typescript-eslint/parser": "8.20.0",
"eslint": "9.18.0",
"jest": "29.7.0",
"prettier": "3.4.2",
"rimraf": "6.0.1",
"rollup": "4.30.1",
"ts-loader": "9.5.2",
"ts-jest": "29.2.5",
"ts-node": "10.9.2",
"tslib": "2.8.1",
"typescript": "5.7.3"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { InversifyContainerErrorKind } from './InversifyContainerErrorKind';

export const isAppErrorSymbol: unique symbol = Symbol.for(
const isAppErrorSymbol: unique symbol = Symbol.for(
'@inversifyjs/container/InversifyContainerError',
);

Expand Down
4 changes: 0 additions & 4 deletions packages/container/libraries/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@
"@inversifyjs/reflect-metadata-utils": "workspace:*"
},
"devDependencies": {
"@eslint/js": "9.18.0",
"@jest/globals": "29.7.0",
"@stryker-mutator/core": "8.7.1",
"@stryker-mutator/jest-runner": "8.7.1",
"@stryker-mutator/typescript-checker": "8.7.1",
"@types/node": "22.10.7",
"@typescript-eslint/eslint-plugin": "8.20.0",
"@typescript-eslint/parser": "8.20.0",
"eslint": "9.18.0",
"jest": "29.7.0",
"prettier": "3.4.2",
Expand All @@ -26,7 +23,6 @@
"rollup": "4.30.1",
"ts-loader": "9.5.2",
"ts-jest": "29.2.5",
"ts-node": "10.9.2",
"tslib": "2.8.1",
"typescript": "5.7.3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Cloneable } from './Cloneable';

const NOT_FOUND_INDEX: number = -1;

export type OneToManyMapStartSpec<TRelation extends object> = {
type OneToManyMapStartSpec<TRelation extends object> = {
[TKey in keyof TRelation]: {
isOptional: undefined extends TRelation[TKey] ? true : false;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { InversifyCoreErrorKind } from './InversifyCoreErrorKind';

export const isAppErrorSymbol: unique symbol = Symbol.for(
const isAppErrorSymbol: unique symbol = Symbol.for(
'@inversifyjs/core/InversifyCoreError',
);

Expand Down
4 changes: 0 additions & 4 deletions packages/container/libraries/strongly-typed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,15 @@
},
"description": "InversifyJs strong type definitions",
"devDependencies": {
"@eslint/js": "9.18.0",
"@jest/globals": "29.7.0",
"@types/node": "22.10.7",
"@typescript-eslint/eslint-plugin": "8.20.0",
"@typescript-eslint/parser": "8.20.0",
"eslint": "9.18.0",
"jest": "29.7.0",
"prettier": "3.4.2",
"rimraf": "6.0.1",
"rollup": "4.30.1",
"ts-loader": "9.5.2",
"ts-jest": "29.2.5",
"ts-node": "10.9.2",
"tslib": "2.8.1",
"typescript": "5.7.3"
},
Expand Down
3 changes: 0 additions & 3 deletions packages/container/tools/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
"@inversifyjs/core": "workspace:*"
},
"devDependencies": {
"@eslint/js": "9.18.0",
"@typescript-eslint/eslint-plugin": "8.20.0",
"@typescript-eslint/parser": "8.20.0",
"eslint": "9.18.0",
"prettier": "3.4.2",
"rimraf": "6.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { Container } from '@inversifyjs/container';

import { BindingParameter } from '../../binding/models/BindingParameter';

export interface EntitiesMap {
interface EntitiesMap {
bindings: Map<string, BindingParameter>;
containers: Map<string, Container>;
}

export interface ContainerRequests {
interface ContainerRequests {
get: Map<string, unknown>;
}

Expand Down
3 changes: 0 additions & 3 deletions packages/docs/services/inversify-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
"devDependencies": {
"@docusaurus/module-type-aliases": "3.7.0",
"@docusaurus/types": "3.7.0",
"@eslint/js": "9.18.0",
"@types/react": "18.3.18",
"@typescript-eslint/eslint-plugin": "8.20.0",
"@typescript-eslint/parser": "8.20.0",
"eslint": "9.18.0",
"eslint-plugin-prettier": "5.2.2",
"eslint-plugin-simple-import-sort": "12.1.1",
Expand Down
4 changes: 0 additions & 4 deletions packages/docs/tools/inversify-code-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,15 @@
"inversify7": "npm:[email protected]"
},
"devDependencies": {
"@eslint/js": "9.18.0",
"@jest/globals": "29.7.0",
"@types/node": "22.10.7",
"@typescript-eslint/eslint-plugin": "8.20.0",
"@typescript-eslint/parser": "8.20.0",
"eslint": "9.18.0",
"glob": "11.0.1",
"jest": "29.7.0",
"prettier": "3.4.2",
"reflect-metadata": "0.2.2",
"rimraf": "6.0.1",
"ts-jest": "29.2.5",
"ts-node": "10.9.2",
"typescript": "5.7.3"
},
"homepage": "https://inversify.io",
Expand Down
4 changes: 0 additions & 4 deletions packages/foundation/libraries/prototype-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,18 @@
"@inversifyjs/common": "workspace:*"
},
"devDependencies": {
"@eslint/js": "9.18.0",
"@jest/globals": "29.7.0",
"@stryker-mutator/core": "8.7.1",
"@stryker-mutator/jest-runner": "8.7.1",
"@stryker-mutator/typescript-checker": "8.7.1",
"@types/node": "22.10.7",
"@typescript-eslint/eslint-plugin": "8.20.0",
"@typescript-eslint/parser": "8.20.0",
"eslint": "9.18.0",
"jest": "29.7.0",
"prettier": "3.4.2",
"rimraf": "6.0.1",
"rollup": "4.30.1",
"ts-loader": "9.5.2",
"ts-jest": "29.2.5",
"ts-node": "10.9.2",
"tslib": "2.8.1",
"typescript": "5.7.3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,18 @@
"url": "https://github.com/inversify/monorepo/issues"
},
"devDependencies": {
"@eslint/js": "9.18.0",
"@jest/globals": "29.7.0",
"@stryker-mutator/core": "8.7.1",
"@stryker-mutator/jest-runner": "8.7.1",
"@stryker-mutator/typescript-checker": "8.7.1",
"@types/node": "22.10.7",
"@typescript-eslint/eslint-plugin": "8.20.0",
"@typescript-eslint/parser": "8.20.0",
"eslint": "9.18.0",
"jest": "29.7.0",
"prettier": "3.4.2",
"rimraf": "6.0.1",
"rollup": "4.30.1",
"ts-loader": "9.5.2",
"ts-jest": "29.2.5",
"ts-node": "10.9.2",
"tslib": "2.8.1",
"typescript": "5.7.3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import getTestMatch from './getTestMatch.js';
* @param { !string } projectName Jest project's name
* @param { !Array<string> } testPathIgnorePatterns Expressions to match to ignored file paths by jest
* @param { ?string } extension Test extension to match
* @returns { !import("jest").Config } Jest config
* @returns { !import("@jest/types").Config.ProjectConfig } Jest config
*/
function getJestJsProjectConfig(
projectName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import getTestMatch from './getTestMatch.js';
* @param { !string } projectName Jest project's name
* @param { !Array<string> } testPathIgnorePatterns Expressions to match to ignored file paths by jest
* @param { ?string } extension Test extension to match
* @returns @returns { !import("jest").Config } Jest config
* @returns @returns { !import("@jest/types").Config.ProjectConfig } Jest config
*/
function getJestTsProjectConfig(
projectName,
Expand Down
3 changes: 3 additions & 0 deletions packages/foundation/tools/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "@inversifyjs/foundation-scripts",
"private": true,
"description": "Common scripts for monorepo packages",
"devDependencies": {
"prettier": "3.4.2"
},
"repository": {
"type": "git",
"url": "git+https://github.com/inversify/monorepo.git"
Expand Down
3 changes: 2 additions & 1 deletion packages/foundation/tools/stryker-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
},
"description": "Stryker config for monorepo packages",
"devDependencies": {
"@stryker-mutator/api": "8.7.1"
"@stryker-mutator/api": "8.7.1",
"prettier": "3.4.2"
},
"exports": "./lib/index.js",
"homepage": "https://github.com/inversify/monorepo#readme",
Expand Down
3 changes: 3 additions & 0 deletions packages/foundation/tools/typescript-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"author": "Roberto Pintos López",
"name": "@inversifyjs/foundation-typescript-config",
"description": "Common typescript config for inversify monorepo packages",
"devDependencies": {
"prettier": "3.4.2"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/inversify/monorepo/issues"
Expand Down

0 comments on commit 724672f

Please sign in to comment.