Skip to content

Commit 03a381b

Browse files
committed
refactor: refactor source to mono repo
1 parent f5ed01f commit 03a381b

File tree

222 files changed

+464
-317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+464
-317
lines changed

Diff for: .github/workflows/release.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939
env:
4040
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
4141

42-
- run: pnpm run publish
42+
- name: Publish
43+
run: node scripts/publish.js
4344
env:
44-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
45+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
46+
NPM_CONFIG_PROVENANCE: true

Diff for: docs/.vitepress/plugins/contributors.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const ID = '/virtual-contributors'
44

55
export function Contributors(data: Record<string, any[]>): Plugin {
66
return {
7-
name: 'vueusjs-utils-contributors',
7+
name: 'js-utils-contributors',
88
resolveId(id) {
99
return id === ID ? ID : null
1010
},

Diff for: docs/.vitepress/plugins/markdownTransform.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@ export function MarkdownTransform(): Plugin {
4444
}
4545
}
4646

47-
const GITHUB_BLOB_URL = 'https://github.com/agiletech-web-dev/js-utils-es/blob/main/src';
47+
const GITHUB_BLOB_URL = 'https://github.com/agiletech-web-dev/js-utils-es/blob/main/packages/core/src';
4848
const GITHUB_BLOB_DOCS_URL = 'https://github.com/agiletech-web-dev/js-utils-es/blob/main/docs/reference';
49-
// https://github.com/agiletech-web-dev/js-utils-es/blob/main/src/array/chunk.ts
50-
// https://github.com/agiletech-web-dev/js-utils-es/blob/main/docs/reference/array/chunk.md
5149

5250
export async function getFunctionMarkdown(pkg: string, name: string) {
5351
const fileNameTs = name.replace('.md', '.ts');

Diff for: docs/package.json

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "docs",
2+
"name": "@js-utils-es/docs",
33
"type": "module",
44
"version": "0.0.0",
55
"private": true,
@@ -8,19 +8,17 @@
88
"build": "vitepress build",
99
"preview": "vitepress preview"
1010
},
11-
"dependencies": {
12-
"@shikijs/transformers": "^1.10.3",
13-
"js-utils-es": "workspace:*",
14-
"prettier": "^3.3.2",
15-
"shiki": "^1.10.3"
16-
},
1711
"devDependencies": {
1812
"@nolebase/vitepress-plugin-enhanced-mark": "^2.2.1",
1913
"@nolebase/vitepress-plugin-enhanced-readabilities": "^2.2.1",
2014
"@nolebase/vitepress-plugin-highlight-targeted-heading": "^2.2.1",
15+
"@shikijs/transformers": "^1.10.3",
2116
"@shikijs/vitepress-twoslash": "^1.10.3",
2217
"@vitejs/plugin-vue-jsx": "^4.0.0",
18+
"js-utils-es": "workspace:*",
19+
"prettier": "^3.3.2",
2320
"sharp": "^0.33.4",
21+
"shiki": "^1.10.3",
2422
"unocss": "^0.61.3",
2523
"vite": "^5.3.3",
2624
"vitepress": "^1.3.0",

Diff for: package.json

+14-203
Original file line numberDiff line numberDiff line change
@@ -1,211 +1,21 @@
11
{
2-
"name": "js-utils-es",
2+
"type": "module",
33
"version": "1.0.8",
4-
"packageManager": "[email protected]",
5-
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
6-
"license": "MIT",
7-
"homepage": "https://js-utils-es.vercel.app",
8-
"repository": {
9-
"type": "git",
10-
"url": "https://github.com/agiletech-web-dev/js-utils-es.git"
11-
},
12-
"bugs": "https://github.com/agiletech-web-dev/js-utils-es/issues",
13-
"sideEffects": false,
14-
"exports": {
15-
".": {
16-
"import": {
17-
"types": "./dist/index.d.mts",
18-
"default": "./dist/index.mjs"
19-
},
20-
"require": {
21-
"types": "./dist/index.d.ts",
22-
"default": "./dist/index.js"
23-
}
24-
},
25-
"./array": {
26-
"import": {
27-
"types": "./dist/array/index.d.mts",
28-
"default": "./dist/array/index.mjs"
29-
},
30-
"require": {
31-
"types": "./dist/array/index.d.ts",
32-
"default": "./dist/array/index.js"
33-
}
34-
},
35-
"./function": {
36-
"import": {
37-
"types": "./dist/function/index.d.mts",
38-
"default": "./dist/function/index.mjs"
39-
},
40-
"require": {
41-
"types": "./dist/function/index.d.ts",
42-
"default": "./dist/function/index.js"
43-
}
44-
},
45-
"./math": {
46-
"import": {
47-
"types": "./dist/math/index.d.mts",
48-
"default": "./dist/math/index.mjs"
49-
},
50-
"require": {
51-
"types": "./dist/math/index.d.ts",
52-
"default": "./dist/math/index.js"
53-
}
54-
},
55-
"./object": {
56-
"import": {
57-
"types": "./dist/object/index.d.mts",
58-
"default": "./dist/object/index.mjs"
59-
},
60-
"require": {
61-
"types": "./dist/object/index.d.ts",
62-
"default": "./dist/object/index.js"
63-
}
64-
},
65-
"./predicate": {
66-
"import": {
67-
"types": "./dist/predicate/index.d.mts",
68-
"default": "./dist/predicate/index.mjs"
69-
},
70-
"require": {
71-
"types": "./dist/predicate/index.d.ts",
72-
"default": "./dist/predicate/index.js"
73-
}
74-
},
75-
"./promise": {
76-
"import": {
77-
"types": "./dist/promise/index.d.mts",
78-
"default": "./dist/promise/index.mjs"
79-
},
80-
"require": {
81-
"types": "./dist/promise/index.d.ts",
82-
"default": "./dist/promise/index.js"
83-
}
84-
},
85-
"./string": {
86-
"import": {
87-
"types": "./dist/string/index.d.mts",
88-
"default": "./dist/string/index.mjs"
89-
},
90-
"require": {
91-
"types": "./dist/string/index.d.ts",
92-
"default": "./dist/string/index.js"
93-
}
94-
},
95-
"./package.json": "./package.json"
96-
},
97-
"main": "./dist/index.js",
98-
"module": "./dist/index.mjs",
99-
"types": "./dist/index.d.ts",
100-
"files": [
101-
"*.d.ts",
102-
"dist"
103-
],
104-
"publishConfig": {
105-
"access": "public",
106-
"main": "./dist/index.js",
107-
"module": "./dist/index.mjs",
108-
"types": "./dist/index.d.ts",
109-
"exports": {
110-
".": {
111-
"import": {
112-
"types": "./dist/index.d.mts",
113-
"default": "./dist/index.mjs"
114-
},
115-
"require": {
116-
"types": "./dist/index.d.ts",
117-
"default": "./dist/index.js"
118-
}
119-
},
120-
"./array": {
121-
"import": {
122-
"types": "./dist/array/index.d.mts",
123-
"default": "./dist/array/index.mjs"
124-
},
125-
"require": {
126-
"types": "./dist/array/index.d.ts",
127-
"default": "./dist/array/index.js"
128-
}
129-
},
130-
"./function": {
131-
"import": {
132-
"types": "./dist/function/index.d.mts",
133-
"default": "./dist/function/index.mjs"
134-
},
135-
"require": {
136-
"types": "./dist/function/index.d.ts",
137-
"default": "./dist/function/index.js"
138-
}
139-
},
140-
"./math": {
141-
"import": {
142-
"types": "./dist/math/index.d.mts",
143-
"default": "./dist/math/index.mjs"
144-
},
145-
"require": {
146-
"types": "./dist/math/index.d.ts",
147-
"default": "./dist/math/index.js"
148-
}
149-
},
150-
"./object": {
151-
"import": {
152-
"types": "./dist/object/index.d.mts",
153-
"default": "./dist/object/index.mjs"
154-
},
155-
"require": {
156-
"types": "./dist/object/index.d.ts",
157-
"default": "./dist/object/index.js"
158-
}
159-
},
160-
"./predicate": {
161-
"import": {
162-
"types": "./dist/predicate/index.d.mts",
163-
"default": "./dist/predicate/index.mjs"
164-
},
165-
"require": {
166-
"types": "./dist/predicate/index.d.ts",
167-
"default": "./dist/predicate/index.js"
168-
}
169-
},
170-
"./promise": {
171-
"import": {
172-
"types": "./dist/promise/index.d.mts",
173-
"default": "./dist/promise/index.mjs"
174-
},
175-
"require": {
176-
"types": "./dist/promise/index.d.ts",
177-
"default": "./dist/promise/index.js"
178-
}
179-
},
180-
"./string": {
181-
"import": {
182-
"types": "./dist/string/index.d.mts",
183-
"default": "./dist/string/index.mjs"
184-
},
185-
"require": {
186-
"types": "./dist/string/index.d.ts",
187-
"default": "./dist/string/index.js"
188-
}
189-
},
190-
"./package.json": "./package.json"
191-
}
192-
},
4+
"packageManager": "[email protected]",
1935
"scripts": {
194-
"build": "tsup && ./scripts/postbuild.sh",
195-
"test": "vitest run --typecheck",
196-
"bench": "vitest bench",
6+
"core:build": "pnpm --filter js-utils-es... build",
7+
"verify-commit": "verify-commit-msg",
1978
"lint": "eslint .",
1989
"lint-fix": "eslint . --fix",
199-
"format": "prettier --write .",
10+
"release": "bumpp package.json packages/*/package.json --all",
11+
"bench": "vitest bench",
12+
"test": "vitest",
20013
"prepare": "git-scm-hooks",
201-
"prepublishOnly": "npm run build",
202-
"release": "bumpp --commit --push --tag",
203-
"docs:dev": "pnpm run -C ./docs dev",
204-
"docs:preview": "pnpm run -C ./docs preview",
205-
"docs:build": "pnpm run -C ./docs build",
206-
"verify-commit": "verify-commit-msg",
207-
"gen-changelog": "esno ./scripts/genFuncUtils.ts && esno ./scripts/changelog.ts",
208-
"typecheck": "tsc --noEmit"
14+
"docs:dev": "pnpm --parallel --filter docs... dev",
15+
"docs:build": "pnpm --filter docs... build",
16+
"docs:preview": "pnpm -C docs preview",
17+
"typecheck": "pnpm -r --filter js-utils-es typecheck",
18+
"gen-changelog": "esno ./scripts/genFuncUtils.ts && esno ./scripts/changelog.ts"
20919
},
21020
"devDependencies": {
21121
"@antfu/eslint-config": "^2.22.0",
@@ -221,7 +31,8 @@
22131
"tsup": "^8.1.0",
22232
"typescript": "^5.4.5",
22333
"verify-commit-msg": "^0.0.10",
224-
"vitest": "^1.5.2"
34+
"vitest": "^1.5.2",
35+
"zx": "^8.1.4"
22536
},
22637
"git-hooks": {
22738
"pre-commit": "npm run lint",

Diff for: packages/core/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# js-utils-es
2+
3+
A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.
4+
5+
Documentation is available at [https://js-utils-es.vercel.app](https://js-utils-es.vercel.app).
6+
7+
## Installation
8+
9+
```sh
10+
npm install js-utils-es
11+
```
12+
13+
## Development
14+
15+
- Clone this repository
16+
- Install latest LTS version of [Node.js](https://nodejs.org/en/)
17+
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`
18+
- Install dependencies using `pnpm install`
19+
- Run interactive tests using `pnpm dev`

0 commit comments

Comments
 (0)