Skip to content

Commit

Permalink
Merge pull request #328 from zitadel/changesets-init
Browse files Browse the repository at this point in the history
chore: Automate publishing packages with changesets
  • Loading branch information
peintnermax authored Jan 6, 2025
2 parents ac9668e + 4e5a48e commit d7264ea
Show file tree
Hide file tree
Showing 28 changed files with 379 additions and 90 deletions.
4 changes: 2 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"baseBranch": "main",
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@zitadel/login"]
}
4 changes: 2 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
root: true,
// This tells ESLint to load the config from the package `eslint-config-zitadel`
extends: ["zitadel"],
// This tells ESLint to load the config from the package `@zitadel/eslint-config`
extends: ["@zitadel/eslint-config"],
settings: {
next: {
rootDir: ["apps/*/"],
Expand Down
28 changes: 28 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install dependencies
run: pnpm install

- name: Create Release Pull Request
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ We think the easiest path of getting up and running, is the following:
- `@zitadel/client`: shared client utilities for node and browser environments
- `@zitadel/proto`: shared protobuf types
- `@zitadel/tsconfig`: shared `tsconfig.json`s used throughout the monorepo
- `eslint-config-zitadel`: ESLint preset
- `@zitadel/eslint-config`: ESLint preset

Each package and app is 100% [TypeScript](https://www.typescriptlang.org/).

Expand Down
6 changes: 3 additions & 3 deletions apps/login/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
"concurrently": "^9.1.0",
"cypress": "^13.15.2",
"del-cli": "6.0.0",
"env-cmd": "^10.1.0",
"eslint-config-zitadel": "workspace:*",
"env-cmd": "^10.0.0",
"@zitadel/eslint-config": "workspace:*",
"grpc-tools": "1.12.4",
"jsdom": "^25.0.1",
"lint-staged": "15.2.10",
Expand All @@ -87,6 +87,6 @@
"tailwindcss": "3.4.14",
"ts-proto": "^2.2.7",
"typescript": "^5.6.3",
"zitadel-tailwind-config": "workspace:*"
"@zitadel/tailwind-config": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion apps/login/tailwind.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import sharedConfig from "zitadel-tailwind-config/tailwind.config.mjs";
import sharedConfig from "@zitadel/tailwind-config/tailwind.config.mjs";

let colors = {
background: { light: { contrast: {} }, dark: { contrast: {} } },
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"axios": "^1.7.7",
"dotenv": "^16.4.5",
"eslint": "8.57.1",
"eslint-config-zitadel": "workspace:*",
"@zitadel/eslint-config": "workspace:*",
"prettier": "^3.2.5",
"prettier-plugin-organize-imports": "^4.1.0",
"tsup": "^8.3.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/zitadel-client/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
root: true,
extends: ["zitadel"],
extends: ["@zitadel/eslint-config"],
};
17 changes: 17 additions & 0 deletions packages/zitadel-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# @zitadel/client

## 1.0.0

### Major Changes

- 32e1199: Initial Release

### Minor Changes

- f32ab7f: Initial release

### Patch Changes

- Updated dependencies [f32ab7f]
- Updated dependencies [32e1199]
- @zitadel/proto@1.0.0
53 changes: 53 additions & 0 deletions packages/zitadel-client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# ZITADEL Client

This package exports services and utilities to interact with ZITADEL

## Installation

To install the package, use npm or yarn:

```sh
npm install @zitadel/client
```

or

```sh
yarn add @zitadel/client
```

## Usage

### Importing Services

You can import and use the services provided by this package to interact with ZITADEL.

```ts
import { createSettingsServiceClient, makeReqCtx } from "@zitadel/client/v2";

// Example usage
const transport = createServerTransport(process.env.ZITADEL_SERVICE_USER_TOKEN!, { baseUrl: process.env.ZITADEL_API_URL! });

const settingsService = createSettingsServiceClient(transport);

settingsService.getBrandingSettings({ ctx: makeReqCtx("orgId") }, {});
```

### Utilities

This package also provides various utilities to work with ZITADEL

```ts
import { timestampMs } from "@zitadel/client";

// Example usage
console.log(`${timestampMs(session.creationDate)}`);
```

## Documentation

For detailed documentation and API references, please visit the [ZITADEL documentation](https://zitadel.com/docs).

## Contributing

Contributions are welcome! Please read the contributing guidelines before getting started.
5 changes: 2 additions & 3 deletions packages/zitadel-client/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "@zitadel/client",
"version": "0.0.0",
"version": "1.0.0",
"license": "MIT",
"private": true,
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -59,6 +58,6 @@
"devDependencies": {
"@bufbuild/protocompile": "^0.0.1",
"@zitadel/tsconfig": "workspace:*",
"eslint-config-zitadel": "workspace:*"
"@zitadel/eslint-config": "workspace:*"
}
}
7 changes: 7 additions & 0 deletions packages/zitadel-eslint-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @zitadel/eslint-config

## 0.1.0

### Minor Changes

- f32ab7f: Initial release
35 changes: 35 additions & 0 deletions packages/zitadel-eslint-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# ZITADEL ESLint Config

This package provides the ESLint configuration used by ZITADEL projects. It includes a set of rules and plugins to ensure consistent code quality and style across all ZITADEL codebases.

## Installation

To install the package, use npm or yarn:

```sh
npm install @zitadel/eslint-config
```

or

```sh
yarn add @zitadel/eslint-config
```

## Usage

To use the ESLint configuration in your project, extend it in your `.eslintrc` file:

```js
{
"extends": "@zitadel/eslint-config"
}
```

## Documentation

For detailed documentation and configuration options, please refer to the [ESLint documentation](https://eslint.org/docs/user-guide/configuring).

## Contributing

Contributions are welcome! Please read the contributing guidelines before getting started.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-zitadel",
"version": "0.0.0",
"name": "@zitadel/eslint-config",
"version": "0.1.0",
"main": "index.js",
"license": "MIT",
"publishConfig": {
Expand Down
7 changes: 7 additions & 0 deletions packages/zitadel-prettier-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @zitadel/prettier-config

## 0.1.0

### Minor Changes

- f32ab7f: Initial release
36 changes: 36 additions & 0 deletions packages/zitadel-prettier-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# ZITADEL Prettier Config

This package provides the Prettier configuration used by ZITADEL projects. It includes a set of formatting rules to ensure consistent code style across all ZITADEL codebases.

## Installation

To install the package, use npm or yarn:

```sh
npm install @zitadel/prettier-config
```

or

```sh
yarn add @zitadel/prettier-config
```

## Usage

To use the Prettier configuration in your project, extend it in your `prettier.config.js` file:

```js
module.exports = {
...require("@zitadel/prettier-config"),
// Add your custom configurations here
};
```

## Documentation

For detailed documentation and configuration options, please refer to the [Prettier documentation](https://prettier.io/docs/en/configuration.html).

## Contributing

Contributions are welcome! Please read the contributing guidelines before getting started.
4 changes: 3 additions & 1 deletion packages/zitadel-prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"version": "0.1.0",
"description": "Prettier configuration",
"type": "module",
"private": true,
"publishConfig": {
"access": "public"
},
"exports": {
".": "./index.js"
}
Expand Down
11 changes: 11 additions & 0 deletions packages/zitadel-proto/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# @zitadel/proto

## 1.0.0

### Major Changes

- 32e1199: Initial Release

### Minor Changes

- f32ab7f: Initial release
35 changes: 35 additions & 0 deletions packages/zitadel-proto/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# ZITADEL Proto

This package provides the Protocol Buffers (proto) definitions used by ZITADEL projects. It includes the proto files and generated code for interacting with ZITADEL's gRPC APIs.

## Installation

To install the package, use npm or yarn:

```sh
npm install @zitadel/proto
```

or

```sh
yarn add @zitadel/proto
```

## Usage

To use the proto definitions in your project, import the generated code:

```ts
import { Organization } from "@zitadel/proto/zitadel/org/v2/org_pb";

const org: Organization | null = await getDefaultOrg();
```

## Documentation

For detailed documentation and API references, please visit the [ZITADEL documentation](https://zitadel.com/docs).

## Contributing

Contributions are welcome! Please read the contributing guidelines before getting started.
2 changes: 1 addition & 1 deletion packages/zitadel-proto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zitadel/proto",
"version": "0.0.0",
"version": "1.0.0",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand Down
7 changes: 7 additions & 0 deletions packages/zitadel-tailwind-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @zitadel/tailwind-config

## 0.1.0

### Minor Changes

- f32ab7f: Initial release
Loading

0 comments on commit d7264ea

Please sign in to comment.