Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
4 changes: 2 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "softnetics/genseki" }],
"changelog": ["@changesets/changelog-github", { "repo": "softnetics/genseki" }],
"commit": false,
"fixed": [
["@genseki/react", "@genseki/next", "@genseki/rest"]
["@genseki/react", "@genseki/next", "@genseki/rest", "@genseki/react-query", "@genseki/plugins"]
],
"linked": [],
"access": "restricted",
Expand Down
2 changes: 1 addition & 1 deletion .changeset/good-cities-cut.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@internals/project-config': minor
'@internal/project-config': minor
'@example/erp': minor
---

Expand Down
2 changes: 1 addition & 1 deletion .changeset/many-friends-behave.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@internals/project-config': minor
'@internal/project-config': minor
'@example/erp': minor
'@genseki/next': minor
'@genseki/react': minor
Expand Down
6 changes: 6 additions & 0 deletions .changeset/short-coats-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@genseki/core': patch
'@genseki/next': patch
---

[[DRIZZ-58] Setup Release workflow](https://app.plane.so/softnetics/browse/DRIZZ-58/)
41 changes: 41 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Dependencies
node_modules
.pnp
.pnp.js

# Local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Testing
coverage

# Turbo
.turbo

# Vercel
.vercel

# Build Outputs
.next/
out/
build
dist


# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Misc
.DS_Store
*.pem

.data

65 changes: 65 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release

on:
push:
branches:
- main

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

permissions:
actions: read
checks: read
contents: write
deployments: read
issues: write
discussions: read
packages: write
pull-requests: write
repository-projects: write
security-events: read
statuses: write

env:
NODE_VERSION: 22.14.0
PNPM_VERSION: 9.0.0

jobs:
release:
name: Versioning
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm

- name: Install changeset
run: pnpm install -g changeset

- name: Install dependencies
run: pnpm install --prefer-offline --frozen-lockfile

- name: Bundle artifacts
run: pnpm bundle

- name: Create Versioning Pull Request
id: changesets
uses: changesets/[email protected]
with:
createGithubReleases: true
version: changeset version
publish: changeset release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 1 addition & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ generated
# CSV
*.csv

# changesets
/.changeset/

data
public

.generated
dist
2 changes: 1 addition & 1 deletion .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from '@internals/project-config/prettier/base.mjs'
export { default } from '@internal/project-config/prettier/base.mjs'
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from '@internals/project-config/eslint/base.mjs'
export { default } from '@internal/project-config/eslint/base.mjs'
2 changes: 1 addition & 1 deletion examples/erp/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from '@internals/project-config/eslint/next.mjs'
export { default } from '@internal/project-config/eslint/next.mjs'
2 changes: 1 addition & 1 deletion examples/erp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"zod": "3.25.53"
},
"devDependencies": {
"@internals/project-config": "workspace:^",
"@internal/project-config": "workspace:^",
"@types/node": "^22.13.10",
"@types/pg": "^8.11.11",
"@types/react": "19.1.4",
Expand Down
2 changes: 1 addition & 1 deletion examples/erp/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@internals/project-config/tsconfig/reactjs.json",
"extends": "@internal/project-config/tsconfig/reactjs.json",
"compilerOptions": {
"baseUrl": ".",
"jsx": "preserve",
Expand Down
8 changes: 7 additions & 1 deletion internals/project-config/package.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change folder package name to correspond to package name ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think no. The packages under examples folder are also name @example

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "@internals/project-config",
"name": "@internal/project-config",
"version": "0.0.1",
"private": true,
"type": "module",
"scripts": {
"lint": "eslint .",
"format": "prettier --write ."
Expand All @@ -18,6 +19,10 @@
"./tsconfig/*": {
"import": "./tsconfig/*",
"require": "./tsconfig/*"
},
"./tsup/*": {
"import": "./tsup/*",
"require": "./tsup/*"
}
},
"dependencies": {
Expand All @@ -36,6 +41,7 @@
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "4.1.4",
"prettier": "^3.5.3",
"tsup": "^8.5.0",
"typescript-eslint": "^8.26.1"
}
}
2 changes: 1 addition & 1 deletion internals/project-config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@internals/project-config/tsconfig/base.json",
"extends": "@internal/project-config/tsconfig/base.json",
"compilerOptions": {
"allowJs": true,
"outDir": "dist",
Expand Down
5 changes: 3 additions & 2 deletions internals/project-config/tsconfig/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"display": "Default",
"compilerOptions": {
"module": "esnext",
"lib": ["es2017"],
"target": "es2024",
"lib": ["ES2024"],
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,
Expand All @@ -17,7 +18,7 @@
"skipLibCheck": true,
"strict": true,
"resolveJsonModule": true,
"verbatimModuleSyntax": true
"verbatimModuleSyntax": true,
},
"exclude": ["node_modules"]
}
11 changes: 11 additions & 0 deletions internals/project-config/tsup/base.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['src/index.ts'],
format: ['cjs', 'esm'], // Build for commonJS and ESmodules
dts: true, // Generate declaration file (.d.ts)
splitting: true,
sourcemap: true,
clean: true,
treeshake: true,
})
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "ttc",
"name": "genseki",
"private": true,
"scripts": {
"build": "turbo run build",
"bundle": "turbo run bundle",
"dev": "turbo run dev",
"lint": "turbo run lint",
"lint:fix": "turbo run lint -- --fix",
Expand All @@ -14,7 +15,7 @@
"devDependencies": {
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.28.1",
"@internals/project-config": "workspace:^",
"@internal/project-config": "workspace:^",
"eslint": "^9.22.0",
"prettier": "^3.5.3",
"turbo": "^2.4.4",
Expand Down
18 changes: 11 additions & 7 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
{
"name": "@genseki/next",
"private": true,
"description": "Next.js integration for Genseki",
"version": "0.0.0",
"sideEffects": false,
"type": "module",
"main": "./src/index.ts",
"module": "./src/index.ts",
"exports": {
".": "./src/index.ts"
},
"files": [
"dist"
],
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"lint": "eslint .",
"format": "prettier --write .",
"format:check": "prettier --check .",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --noEmit",
"bundle": "tsup"
},
"dependencies": {
"@genseki/react": "workspace:^",
Expand All @@ -27,6 +30,7 @@
"devDependencies": {
"@types/react": "^19.1.6",
"@types/react-dom": "^19.1.6",
"tsup": "^8.5.0",
"type-fest": "^4.41.0",
"vitest": "^3.0.9"
}
Expand Down
2 changes: 0 additions & 2 deletions packages/next/src/pages/root.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'server-only'

import { NotAuthorizedPage, NotfoundPage, type ServerFunction } from '@genseki/react'

import type { NextJsServerConfig } from '../config'
Expand Down
4 changes: 2 additions & 2 deletions packages/next/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "@internals/project-config/tsconfig/reactjs.json",
"extends": "@internal/project-config/tsconfig/reactjs.json",
"compilerOptions": {
"rootDir": ".",
"baseUrl": ".",
"lib": ["dom"],
"module": "ESNext",
"moduleResolution": "bundler"
}
Expand Down
1 change: 1 addition & 0 deletions packages/next/tsup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '@internal/project-config/tsup/base.mjs'
17 changes: 10 additions & 7 deletions packages/plugins/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{
"name": "@genseki/plugins",
"private": true,
"version": "0.0.0",
"sideEffects": false,
"type": "module",
"main": "./src/index.ts",
"module": "./src/index.ts",
"exports": {
".": "./src/index.ts"
},
"files": [
"dist"
],
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"lint": "eslint .",
"format": "prettier --write .",
"format:check": "prettier --check .",
"typecheck": "tsc --noEmit",
"diagnostics": "tsc --noEmit --extendedDiagnostics"
"diagnostics": "tsc --noEmit --extendedDiagnostics",
"bundle": "tsup"
},
"dependencies": {
"cookie-es": "^2.0.0",
Expand All @@ -26,6 +28,7 @@
"devDependencies": {
"@genseki/react": "workspace:^",
"@types/json-schema": "^7.0.15",
"tsup": "^8.5.0",
"type-fest": "^4.38.0",
"vitest": "^3.0.9"
}
Expand Down
1 change: 1 addition & 0 deletions packages/plugins/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './admin'
4 changes: 2 additions & 2 deletions packages/plugins/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "@internals/project-config/tsconfig/reactjs.json",
"extends": "@internal/project-config/tsconfig/reactjs.json",
"compilerOptions": {
"rootDir": ".",
"baseUrl": ".",
"jsx": "react-jsx",
"module": "ESNext",
"moduleResolution": "bundler"
}
Expand Down
1 change: 1 addition & 0 deletions packages/plugins/tsup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '@internal/project-config/tsup/base.mjs'
Loading
Loading