Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Mar 31, 2023
1 parent 64f383a commit d9ebd8c
Show file tree
Hide file tree
Showing 51 changed files with 2,025 additions and 1,041 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@

##### Utilities
- [extend](https://github.com/1aron/techor/tree/main/packages/extend) — Deeply extend objects ~380B
- [a plain obj](https://github.com/1aron/techor/tree/main/packages/a-plain-obj) — Is it a plain object? ~100B
- [cross import](https://github.com/1aron/techor/tree/main/packages/cross-import) — Import .ts, .mjs, .cjs files across environments as JavaScript modules
- [a plain obj](https://github.com/1aron/techor/tree/main/packages/is-plain-obj) — Is it a plain object? ~100B
- [cross import](https://github.com/1aron/techor/tree/main/packages/x-import) — Import .ts, .mjs, .cjs files across environments as JavaScript modules
- [fs](https://github.com/1aron/techor/tree/main/packages/fs) — A human-friendly file system with glob patterns
- [read workspace packages](https://github.com/1aron/techor/tree/main/packages/read-workspace-packages) — Read workspace package.json contents
- [query workspaces](https://github.com/1aron/techor/tree/main/packages/query-workspaces) — Query workspaces with package.json
Expand Down
2,697 changes: 1,826 additions & 871 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"type-check": "turbo run type-check",
"dev": "turbo run dev --force",
"version": "tsx ./packages/techor/src/bin version",
"analyze:commit": "semantic-release --debug"
"analyze:commit": "semantic-release --debug",
"clean:dist": "rm -rf ./packages/**/*dist",
"clean:node": "rm -rf ./{examples,packages}/**/*node_modules"
},
"repository": {
"type": "git",
Expand Down
36 changes: 18 additions & 18 deletions packages/conventional-changelog-config/.dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
### New Features

- Amazing new module <sub><sup>[eec5719](https://github.com/conventional-changelog/conventional-changelog/commit/eec5719d1e1c80185be89fc78ea3b20ed6122fd8)</sup></sub>
- **API** - New option for test [#88](https://github.com/conventional-changelog/conventional-changelog/issues/88) <sub><sup>[a0633bf](https://github.com/conventional-changelog/conventional-changelog/commit/a0633bf61195160b8c70f620c3355e2f55e31422)</sup></sub>
- **Awesome** - Addresses the issue brought up in [#133](https://github.com/conventional-changelog/conventional-changelog/issues/133) <sub><sup>[9d64b62](https://github.com/conventional-changelog/conventional-changelog/commit/9d64b62d8f7493ec4409d8bf5eebda487e3f1a53)</sup></sub>
- **Search** - Issue brought up by [@1aron](https://github.com/1aron)! on Friday <sub><sup>[e446590](https://github.com/conventional-changelog/conventional-changelog/commit/e446590107fdbcddf2060debea80cf5f42eae1ef)</sup></sub>
- Amazing new module <sub><sup>[f649620](https://github.com/conventional-changelog/conventional-changelog/commit/f649620e22c66b98dc83baf32239c313e0f021bb)</sup></sub>
- **API** - New option for test [#88](https://github.com/conventional-changelog/conventional-changelog/issues/88) <sub><sup>[d5f0271](https://github.com/conventional-changelog/conventional-changelog/commit/d5f02716681e34860fd02a0da82f2b8a36fc9ed0)</sup></sub>
- **Awesome** - Addresses the issue brought up in [#133](https://github.com/conventional-changelog/conventional-changelog/issues/133) <sub><sup>[e93176e](https://github.com/conventional-changelog/conventional-changelog/commit/e93176e1936cfe69369d40cf6993b24b5ac568e3)</sup></sub>
- **Search** - Issue brought up by [@1aron](https://github.com/1aron)! on Friday <sub><sup>[bc3ad98](https://github.com/conventional-changelog/conventional-changelog/commit/bc3ad980322ceda6b0f1b12d5c809f72aad0a85c)</sup></sub>

### Performance Upgrades

- **`ngOptions`** - Make it faster <sub><sup>[ce77060](https://github.com/conventional-changelog/conventional-changelog/commit/ce77060ae97c3b72bedb53c9e93c67d599d10eec)</sup></sub>, [#1](https://github.com/conventional-changelog/conventional-changelog/issues/1) [#2](https://github.com/conventional-changelog/conventional-changelog/issues/2)
- **`ngOptions`** - Make it faster, [#1](https://github.com/conventional-changelog/conventional-changelog/issues/1), [#2](https://github.com/conventional-changelog/conventional-changelog/issues/2) <sub><sup>[322020e](https://github.com/conventional-changelog/conventional-changelog/commit/322020ea700b69f67acb9706da5f800ecd5504c3)</sup></sub>
- **`ngOptions`** - Make it faster <sub><sup>[9f9d612](https://github.com/conventional-changelog/conventional-changelog/commit/9f9d6121a591d8c878b0ecaef8df932dcffc7f68)</sup></sub>, [#1](https://github.com/conventional-changelog/conventional-changelog/issues/1) [#2](https://github.com/conventional-changelog/conventional-changelog/issues/2)
- **`ngOptions`** - Make it faster, [#1](https://github.com/conventional-changelog/conventional-changelog/issues/1), [#2](https://github.com/conventional-changelog/conventional-changelog/issues/2) <sub><sup>[fb4a266](https://github.com/conventional-changelog/conventional-changelog/commit/fb4a2665b653d1160bb3bc6e14aaf6b7f1d49b2e)</sup></sub>

### Updates

- **Contact** - Address and tel <sub><sup>[b75429c](https://github.com/conventional-changelog/conventional-changelog/commit/b75429c035c0429c09fb53027fe80407c4ab5d06)</sup></sub>
- **Contact** - Address and tel <sub><sup>[37b9a02](https://github.com/conventional-changelog/conventional-changelog/commit/37b9a02602a40f73984682961f950f5b2508a068)</sup></sub>

### Improvements

- **UI** - Call to action <sub><sup>[f1ebd06](https://github.com/conventional-changelog/conventional-changelog/commit/f1ebd06b5691ef576c3ed28b97eaa4b74f51b207)</sup></sub>
- **UI** - Call to action <sub><sup>[c9f632a](https://github.com/conventional-changelog/conventional-changelog/commit/c9f632a571db5b254fb3147c22feb87224754108)</sup></sub>

### Bug Fixes

- **Compiler** - Avoid a bug <sub><sup>[e7ed39c](https://github.com/conventional-changelog/conventional-changelog/commit/e7ed39c2233b70815916e334a9d9f02d25fbdaf0)</sup></sub>
- Content not changed <sub><sup>[6dfb288](https://github.com/conventional-changelog/conventional-changelog/commit/6dfb288d5956f3be7bf8cc0ecbecf8ff75f9ede6)</sup></sub>
- **Normal.css** - Layout shift <sub><sup>[bafca61](https://github.com/conventional-changelog/conventional-changelog/commit/bafca61bec2110d74c8aca83e47e4ceb20d09a18)</sup></sub>
- **Vite** - HMR causes page reloaded <sub><sup>[faba590](https://github.com/conventional-changelog/conventional-changelog/commit/faba59049e7a53ddd7a58243587531deb602f238)</sup></sub>
- **Compiler** - Avoid a bug <sub><sup>[679ebc3](https://github.com/conventional-changelog/conventional-changelog/commit/679ebc35f1cd6f8e9b61856403efaa0f99d26c03)</sup></sub>
- Content not changed <sub><sup>[758c7eb](https://github.com/conventional-changelog/conventional-changelog/commit/758c7eb84096463306f9a525626190dad44ae406)</sup></sub>
- **Normal.css** - Layout shift <sub><sup>[82f13f2](https://github.com/conventional-changelog/conventional-changelog/commit/82f13f23a771171426ae996dc1db3099907e3924)</sup></sub>
- **Vite** - HMR causes page reloaded <sub><sup>[012e536](https://github.com/conventional-changelog/conventional-changelog/commit/012e5369903ae9d8f5a489a5870b88926a9e7a41)</sup></sub>

### Deprecations

- **Commitlint Config** - Remove `header-max-length` rule <sub><sup>[43d31f9](https://github.com/conventional-changelog/conventional-changelog/commit/43d31f9f403d31cd6eeed15eefe1076353b07e1d)</sup></sub>
- **Syntax** - Use `fg:color` instead of ~~`font:color`~~ <sub><sup>[b8b0fe7](https://github.com/conventional-changelog/conventional-changelog/commit/b8b0fe7492b2f5a64aaa1bb9a842dca4a9fd3bc3)</sup></sub>
- **Commitlint Config** - Remove `header-max-length` rule <sub><sup>[ae7b3bb](https://github.com/conventional-changelog/conventional-changelog/commit/ae7b3bba063f3c40b35391a72b247ec3d122659b)</sup></sub>
- **Syntax** - Use `fg:color` instead of ~~`font:color`~~ <sub><sup>[a12ee9b](https://github.com/conventional-changelog/conventional-changelog/commit/a12ee9ba9b24709962bc89c72d0b8e17dda48892)</sup></sub>

### Documentation

- Add `font-size` demo <sub><sup>[34cb9b4](https://github.com/conventional-changelog/conventional-changelog/commit/34cb9b4f3c92a9128e56fe0cba43579d85d55372)</sup></sub>
- Add `font-size` demo <sub><sup>[0537a1e](https://github.com/conventional-changelog/conventional-changelog/commit/0537a1e64a02649110f5609a29f325a4c7c466b3)</sup></sub>

### Upgrades

- Bump `@dummy/package` from 7.1.2 to 8.0.0 <sub><sup>[10703fd](https://github.com/conventional-changelog/conventional-changelog/commit/10703fdb12e74851564bb2260dd45e0bda7f60a9)</sup></sub>
- Bump `@dummy/package` from 7.1.2 to 8.0.0 <sub><sup>[7693f6a](https://github.com/conventional-changelog/conventional-changelog/commit/7693f6a077e6028e821f5cfb1bab861b3352efa0)</sup></sub>

### Reversions

- Revert《 Fix(Repo): PeerDependencies -> Dependencies 》 <sub><sup>[a4896ec](https://github.com/conventional-changelog/conventional-changelog/commit/a4896ecac0aa32193c067f00c31390d9fcb4ad8e)</sup></sub>
- **`ngOptions`** - Bad commit <sub><sup>[043d82c](https://github.com/conventional-changelog/conventional-changelog/commit/043d82cd5de80faa032dd924875a623576579db5)</sup></sub>
- Revert《 Fix(Repo): PeerDependencies -> Dependencies 》 <sub><sup>[0c0ea18](https://github.com/conventional-changelog/conventional-changelog/commit/0c0ea180bbf80f6edb1ea359b1435ae6351e5f7c)</sup></sub>
- **`ngOptions`** - Bad commit <sub><sup>[ebf9894](https://github.com/conventional-changelog/conventional-changelog/commit/ebf98942220e0d93e0a466da121f3bd571bafbd6)</sup></sub>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
### New Features

- `it` alias for `test` <sub><sup>[cc4dec8](https://github.com/conventional-changelog/conventional-changelog/commit/cc4dec89c5392bfaf4fd2bacad45770e467b8420)</sup></sub>
- `it` alias for `test` <sub><sup>[0e4c377](https://github.com/conventional-changelog/conventional-changelog/commit/0e4c37729f6d3c1562aee54727eb0e0bde8605e3)</sup></sub>
19 changes: 11 additions & 8 deletions packages/conventional-changelog-config/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "conventional-changelog-techor",
"scripts": {
"build": "tsx ../techor/src/bin pack --shakable",
"dev": "npm run build -- --watch",
"build:cjs": "esbuild src/index.ts --bundle --outfile=dist/index.js --format=cjs --minify --sourcemap --platform=node --external:esbuild --external:fast-glob --external:require-from-string --external:@techor/extend --external:@techor/fs --external:upath",
"build:esm": "esbuild src/index.ts --bundle --outfile=dist/index.mjs --format=esm --minify --sourcemap --platform=node --external:esbuild --external:fast-glob --external:require-from-string --external:@techor/extend --external:@techor/fs --external:upath",
"build:type": "tsc --emitDeclarationOnly --preserveWatchOutput",
"build": "npm run build:cjs && npm run build:esm && npm run build:type",
"dev": "conc 'npm:build:* -- --watch'",
"test": "jest",
"type-check": "tsc --noEmit",
"lint": "eslint src"
Expand Down Expand Up @@ -30,15 +33,15 @@
"techor",
"preset"
],
"main": "./dist/cjs/index.js",
"jsnext:main": "./dist/esm/index.mjs",
"esnext": "./dist/esm/index.mjs",
"module": "./dist/esm/index.mjs",
"main": "./dist/index.js",
"jsnext:main": "./dist/index.mjs",
"esnext": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.mjs",
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
}
},
Expand Down
19 changes: 11 additions & 8 deletions packages/conventional-commits/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
"name": "techor-conventional-commits",
"license": "MIT",
"scripts": {
"build": "tsx ../techor/src/bin pack --shakable",
"dev": "npm run build -- --watch",
"build:cjs": "esbuild src/index.ts --bundle --outfile=dist/index.js --format=cjs --minify --sourcemap --platform=node --external:esbuild --external:fast-glob --external:require-from-string --external:@techor/extend --external:@techor/fs --external:upath",
"build:esm": "esbuild src/index.ts --bundle --outfile=dist/index.mjs --format=esm --minify --sourcemap --platform=node --external:esbuild --external:fast-glob --external:require-from-string --external:@techor/extend --external:@techor/fs --external:upath",
"build:type": "tsc --emitDeclarationOnly --preserveWatchOutput",
"build": "npm run build:cjs && npm run build:esm && npm run build:type",
"dev": "conc 'npm:build:* -- --watch'",
"type-check": "tsc --noEmit",
"lint": "eslint src"
},
Expand Down Expand Up @@ -33,15 +36,15 @@
"techor",
"preset"
],
"main": "./dist/cjs/index.js",
"jsnext:main": "./dist/esm/index.mjs",
"esnext": "./dist/esm/index.mjs",
"module": "./dist/esm/index.mjs",
"main": "./dist/index.js",
"jsnext:main": "./dist/index.mjs",
"esnext": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.mjs",
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
}
},
Expand Down
12 changes: 6 additions & 6 deletions packages/extend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<img alt="NPM Version" src="https://img.shields.io/github/v/release/1aron/utils?include_prereleases&color=f6f7f8&label=&style=for-the-badge&logo=github">
</picture>
</a>
<a aria-label="NPM Package" href="https://www.npmjs.com/package/to-extend">
<a aria-label="NPM Package" href="https://www.npmjs.com/package/@techor/extend">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/dm/to-extend?color=212022&label=%20&logo=npm&style=for-the-badge">
<source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/dm/to-extend?color=f6f7f8&label=%20&logo=npm&style=for-the-badge">
<img alt="NPM package ( download / month )" src="https://img.shields.io/npm/dm/to-extend?color=f6f7f8&label=%20&logo=npm&style=for-the-badge">
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/dm/@techor/extend?color=212022&label=%20&logo=npm&style=for-the-badge">
<source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/dm/@techor/extend?color=f6f7f8&label=%20&logo=npm&style=for-the-badge">
<img alt="NPM package ( download / month )" src="https://img.shields.io/npm/dm/@techor/extend?color=f6f7f8&label=%20&logo=npm&style=for-the-badge">
</picture>
</a>
<a aria-label="Follow @aron1tw" href="https://twitter.com/aron1tw">
Expand Down Expand Up @@ -55,12 +55,12 @@
## Getting Started

```bash
npm install to-extend
npm install @techor/extend
```

## Usage
```js
import extend from 'to-extend'
import extend from '@techor/extend'

extend({ a: 1, b:2 }, { b: null, c:3 })
// { a:1, b: null, c:3 }
Expand Down
13 changes: 8 additions & 5 deletions packages/extend/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "to-extend",
"name": "@techor/extend",
"scripts": {
"build": "tsx ../techor/src/bin pack",
"dev": "npm run build -- --watch",
"build:cjs": "esbuild src/index.ts --bundle --outfile=dist/index.js --format=cjs --minify --sourcemap --platform=node",
"build:esm": "esbuild src/index.ts --bundle --outfile=dist/index.mjs --format=esm --minify --sourcemap --platform=node",
"build:type": "tsc --emitDeclarationOnly --preserveWatchOutput",
"build": "npm run build:cjs && npm run build:esm && npm run build:type",
"dev": "conc 'npm:build:* -- --watch'",
"test": "jest",
"type-check": "tsc --noEmit",
"lint": "eslint src"
Expand Down Expand Up @@ -30,14 +33,14 @@
"utils"
],
"sideEffects": false,
"main": "./dist/index.cjs",
"main": "./dist/index.js",
"jsnext:main": "./dist/index.mjs",
"esnext": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"require": "./dist/index.cjs",
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
}
Expand Down
12 changes: 6 additions & 6 deletions packages/fs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<img alt="NPM Version" src="https://img.shields.io/github/v/release/1aron/utils?include_prereleases&color=f6f7f8&label=&style=for-the-badge&logo=github">
</picture>
</a>
<a aria-label="NPM Package" href="https://www.npmjs.com/package/to-fs">
<a aria-label="NPM Package" href="https://www.npmjs.com/package/@techor/fs">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/dm/to-fs?color=212022&label=%20&logo=npm&style=for-the-badge">
<source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/dm/to-fs?color=f6f7f8&label=%20&logo=npm&style=for-the-badge">
<img alt="NPM package ( download / month )" src="https://img.shields.io/npm/dm/to-fs?color=f6f7f8&label=%20&logo=npm&style=for-the-badge">
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/dm/@techor/fs?color=212022&label=%20&logo=npm&style=for-the-badge">
<source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/dm/@techor/fs?color=f6f7f8&label=%20&logo=npm&style=for-the-badge">
<img alt="NPM package ( download / month )" src="https://img.shields.io/npm/dm/@techor/fs?color=f6f7f8&label=%20&logo=npm&style=for-the-badge">
</picture>
</a>
<a aria-label="Follow @aron1tw" href="https://twitter.com/aron1tw">
Expand All @@ -48,7 +48,7 @@
## Getting Started

```bash
npm install to-fs
npm install @techor/fs
```

## Usage
Expand All @@ -70,7 +70,7 @@ writeToFile(filePath: fs.PathOrFileDescriptor, data: any, options?: WriteToFileO
{ "name": "b" }
```
```js
import { readFile, readFiles } from 'to-fs'
import { readFile, readFiles } from '@techor/fs'

readFile('a.*')
// Buffer
Expand Down
17 changes: 10 additions & 7 deletions packages/fs/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "to-fs",
"name": "@techor/fs",
"scripts": {
"build": "tsx ../techor/src/bin pack --platform node",
"dev": "npm run build -- --watch",
"build:cjs": "esbuild src/index.ts --bundle --outfile=dist/index.js --format=cjs --minify --sourcemap --platform=node --external:fast-glob --external:@techor/extend --external:upath",
"build:esm": "esbuild src/index.ts --bundle --outfile=dist/index.mjs --format=esm --minify --sourcemap --platform=node --external:fast-glob --external:@techor/extend --external:upath",
"build:type": "tsc --emitDeclarationOnly --preserveWatchOutput",
"build": "npm run build:cjs && npm run build:esm && npm run build:type",
"dev": "conc 'npm:build:* -- --watch'",
"test": "jest",
"type-check": "tsc --noEmit",
"lint": "eslint src"
Expand All @@ -21,7 +24,7 @@
"repository": {
"type": "git",
"url": "https://github.com/1aron/utils.git",
"directory": "packages/to-fs"
"directory": "packages/@techor/fs"
},
"keywords": [
"read",
Expand All @@ -36,14 +39,14 @@
"utils"
],
"sideEffects": false,
"main": "./dist/index.cjs",
"main": "./dist/index.js",
"jsnext:main": "./dist/index.mjs",
"esnext": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"require": "./dist/index.cjs",
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
}
Expand All @@ -53,7 +56,7 @@
],
"dependencies": {
"fast-glob": "^3.2.12",
"to-extend": "",
"@techor/extend": "",
"upath": "^2.0.1"
}
}
2 changes: 1 addition & 1 deletion packages/fs/src/read.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from 'fs'
import upath from 'upath'
import fg from 'fast-glob'
import extend from 'to-extend'
import extend from '@techor/extend'

interface Options extends fg.Options {
encoding?: BufferEncoding
Expand Down
2 changes: 1 addition & 1 deletion packages/fs/src/write.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs'
import extend from 'to-extend'
import extend from '@techor/extend'
import upath from 'upath'

interface WriteToFileOptions {
Expand Down
Loading

0 comments on commit d9ebd8c

Please sign in to comment.