Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop into main #46

Merged
merged 7 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/shaggy-ties-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'feature-logger': patch
'@ibg/openapi-router': patch
'feature-fetch': patch
'feature-state': patch
'feature-form': patch
---

Listed `@ibg/types` as a dependency to ensure it's automatically installed for consumers, preventing issues like `any` types for `feature-x` packages due to missing `TUnionToIntersection`.

For more details: [Microsoft/types-publisher/issues/81](https://github.com/Microsoft/types-publisher/issues/81).
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ For specific packages, additional fields should be included as shown below. Note
}
```

## Q and A

### Why is `@ibg/types` listed as a dependency in some packages?

`@ibg/types` is listed as a dependency to ensure it's automatically installed for consumers, preventing issues like `any` types for `feature-x` packages due to missing `TUnionToIntersection`.

For more details: [Microsoft/types-publisher/issues/81](https://github.com/Microsoft/types-publisher/issues/81).

Alternatives:
- Move `TUnionToIntersection` into each package
- Enforce `@ibg/types` as a `peerDependency`

## 📄 License

By contributing to inbeta.group, you agree that your contributions will be licensed under the license defined in [`LICENSE.md`](./LICENSE.md).
Expand Down
7 changes: 7 additions & 0 deletions examples/openapi-router/express/petstore/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* @type {import('eslint').Linter.Config}
*/
module.exports = {
root: true,
extends: [require.resolve('@ibg/config/eslint/library')]
};
1 change: 1 addition & 0 deletions examples/openapi-router/express/petstore/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/swagger-api/swagger-petstore
6 changes: 6 additions & 0 deletions examples/openapi-router/express/petstore/nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"watch": ["./src"],
"ext": "ts,json",
"ignore": ["*.spec.ts", "*.test.ts"],
"exec": "node -r tsconfig-paths/register -r ts-node/register ./src/index.ts"
}
30 changes: 30 additions & 0 deletions examples/openapi-router/express/petstore/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "petstore",
"version": "1.0.0",
"private": true,
"scripts": {
"build": "tsc",
"start:dev": "nodemon --config ./nodemon.json",
"gen:openapi": "npx openapi-typescript ./resources/openapi-v1.yaml -o ./src/gen/v1.ts"
},
"source": "./src/index.ts",
"main": "./dist/index.js",
"dependencies": {
"@ibg/openapi-router": "workspace:*",
"express": "^4.19.2",
"valibot": "^0.35.0",
"validation-adapters": "workspace:*"
},
"devDependencies": {
"@ibg/config": "workspace:*",
"@types/express": "^4.17.21",
"@types/node": "^20.14.10",
"nodemon": "^3.1.4",
"openapi-typescript": "^7.0.2",
"ts-node": "^10.9.2"
},
"files": [
"dist",
"README.md"
]
}
Loading