Skip to content

Commit

Permalink
refactor(typebox): move typebox on root package and refactor path exp…
Browse files Browse the repository at this point in the history
…ort on package
  • Loading branch information
andrefelipeschulle committed Oct 10, 2024
1 parent 1558458 commit 3a8ad66
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/cool-needles-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@brainylab/resolver-validators": minor
---

move typebox on root package and refactor path export on package
2 changes: 1 addition & 1 deletion .github/workflows/sync-beta-to-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_branch: 'beta'
destination_branch: 'main'
pr_title: 'auto-sync beta to main'
pr_title: 'auto sync beta to main'
pr_body: |
## Automated: Sync from Beta to Main
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dist
coverage

.DS_Store
resolvers/*
typebox/*
index.cjs
index.d.ts
index.d.cts
Expand Down
6 changes: 3 additions & 3 deletions clean-package.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"require": "./index.cjs"
},
"./typebox": {
"types": "./typebox.d.ts",
"import": "./typebox.js",
"require": "./typebox.cjs"
"types": "./typebox/index.d.ts",
"import": "./typebox/index.js",
"require": "./typebox/index.cjs"
},
"./package.json": "./package.json"
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"index.js",
"index.d.ts",
"index.cjs",
"resolvers"
"typebox"
],
"scripts": {
"build": "rimraf dist && pnpm build:core && pnpm build:typebox && pnpm build:create:package && pnpm build:copy:files",
"build:copy:files": "cp -r ./dist/** ./",
"build:core": "tsup src/index.ts --dts",
"build:create:package": "node ./scripts/create-package.mjs",
"build:typebox": "tsup src/resolvers/typebox/index.ts --dts --out-dir dist/resolvers/typebox",
"build:typebox": "tsup src/resolvers/typebox/index.ts --dts --out-dir dist/typebox",
"commit": "pnpm commit:add && pnpm commit:detail && pnpm commit:push",
"commit:add": "git add .",
"commit:detail": "cz",
Expand Down
3 changes: 1 addition & 2 deletions scripts/create-package.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';

// Converte import.meta.url para um caminho de arquivo
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const distPath = path.resolve(__dirname, '..', 'dist');

const getFolders = () => {
const folders = [path.resolve(distPath, 'resolvers', 'typebox')];
const folders = [path.resolve(distPath, 'typebox')];

return folders;
};
Expand Down

0 comments on commit 3a8ad66

Please sign in to comment.