Skip to content

Commit

Permalink
chore: releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-R44 committed May 19, 2024
1 parent dae1f80 commit f09457e
Show file tree
Hide file tree
Showing 12 changed files with 116 additions and 98 deletions.
21 changes: 0 additions & 21 deletions .changeset/bright-emus-glow.md

This file was deleted.

33 changes: 0 additions & 33 deletions .changeset/few-cheetahs-add.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/gentle-carrots-work.md

This file was deleted.

34 changes: 0 additions & 34 deletions .changeset/gold-pugs-act.md

This file was deleted.

22 changes: 22 additions & 0 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# @tuyau/client

## 0.1.2

### Patch Changes

- 793a775: Add $current helper to check the current route. You can use the `$current` method to get or check the current route :

```ts
// Current window location is http://localhost:3000/users/1/posts/2, route name is users.posts.show
tuyau.$current(); // users.posts
tuyau.$current("users.posts.show"); // true
tuyau.$current("users.*"); // true
tuyau.$current("users.edit"); // false
```

You can also specify route parameters or query parameters to check :

```ts
tuyau.$current("users.posts.show", { params: { id: 1, postId: 2 } }); // true
tuyau.$current("users.posts.show", { params: { id: 12 } }); // false
tuyau.$current("users.posts.show", { query: { page: 1 } }); // false
```

## 0.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tuyau/client",
"type": "module",
"version": "0.1.1",
"version": "0.1.2",
"description": "e2e client for AdonisJS",
"author": "Julien Ripouteau <[email protected]>",
"license": "ISC",
Expand Down
6 changes: 6 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @tuyau/core

## 0.1.4

### Patch Changes

- dae1f80: When a vine validator referenced in a `validateUsing` was imported with a `default export`, then the validator was not found. This is now fixed.

## 0.1.1

- Fix: The `node ace configure @tuyau/core` was failing due to a stub file not being copied correctly. This has been fixed.
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tuyau/core",
"type": "module",
"version": "0.1.3",
"version": "0.1.4",
"description": "",
"author": "",
"license": "MIT",
Expand Down
40 changes: 40 additions & 0 deletions packages/inertia/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# @tuyau/inertia

## 0.0.1

### Patch Changes

- 2da60a7: This PR introduces a new `@tuyau/inertia` package. Goal is to add some components to provide greater type-safety on AdonisJS x InertiaJS apps.

With this PR, we're only adding the `Link` component, for React and Vue, which is a wrapper of the InertiaJS `Link` component, but type-safe.

Usage is super easy : just import `Link` from `@tuyau/inertia` rather than `@inertiajs/inertia-react` or `@inertiajs/inertia-vue`.

```vue
<script setup lang="ts">
import { Link } from "@tuyau/inertia";
</script>
<template>
<Link route="posts.edit" :params="{ id: 2 }">Home</Link>
</template>
```

Same for React :

```tsx
import { Link } from "@tuyau/inertia";

export function MyComponent() {
return (
<Link route="posts.edit" params={{ id: 2 }}>
Home
</Link>
);
}
```

`Link` component has the same props as the InertiaJS `Link`, except for the `href` and `method` props, which are not needed anymore and replaced by the `route` and `params` props.

- Updated dependencies [793a775]
- @tuyau/client@0.1.2
2 changes: 1 addition & 1 deletion packages/inertia/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tuyau/inertia",
"type": "module",
"version": "0.0.0",
"version": "0.0.1",
"description": "",
"author": "Julien Ripouteau <[email protected]>",
"license": "ISC",
Expand Down
43 changes: 43 additions & 0 deletions packages/openapi/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# @tuyau/openapi

## 0.1.2

### Patch Changes

- 649adc4: First experimental version of @tuyau/openapi.

## OpenAPI Spec generation

The concept is quite simple: we generate an openapi spec from the @tuyau/core codegen. This generation is done using ts-morph and the typescript compiler: we analyse and extract the types of requests/replies, and generate the OpenAPI spec based on this. Of course, there are limitations compared to manually written specs. I'll go into more detail about the limitations in the documentation coming soon.
That said, although there are limitations, I think that in many cases it can do the job just fine

Also, to bypass some of the limitations of the automatic generation, you can add details to the spec using the `detail` macro available on the routes :

```ts
router
.group(() => {
router
.get("/random", [MiscController, "index"])
.detail({ description: "Get a random thing" });
router
.get("/random/:id", [MiscController, "show"])
.detail({ description: "Get a random thing by id" });
})
.prefix("/misc")
.detail({ tags: ["misc"] });
```

These `details` will be merged and added to the auto-generated OpenAPI spec.

## OpenAPI Viewer

In addition to auto-generation, the package will automatically expose a `/docs` route on which the openapi spec is served, via either Scalar or Swagger-UI. Everything is configurable.

![image](https://github.com/Julien-Sponsors/tuyau/assets/8337858/95840899-cbe6-42bf-983e-b968d1d17fe6)

***

This version is very experimental. There are a few things that don't work 100% yet: some types are badly generated. But this is a pretty decent first version. Also, I will detail how to install and use it in the coming documentation

- Updated dependencies [dae1f80]
- @tuyau/core@0.1.4
4 changes: 2 additions & 2 deletions packages/openapi/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tuyau/openapi",
"type": "module",
"version": "0.1.1",
"version": "0.1.2",
"description": "",
"author": "",
"license": "MIT",
Expand Down Expand Up @@ -33,7 +33,7 @@
"prepublishOnly": "npm run build"
},
"peerDependencies": {
"@tuyau/core": "^0.1.1"
"@tuyau/core": "^0.1.4"
},
"dependencies": {
"defu": "^6.1.4",
Expand Down

0 comments on commit f09457e

Please sign in to comment.