Skip to content

Commit

Permalink
chore(release): v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zAlweNy26 authored Apr 1, 2024
2 parents 84e7a49 + 92fd28d commit c489482
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 26 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint and Test

on:
push:
branches:
- main
- develop
paths-ignore:
- '**.md'
pull_request:
branches:
- main
- develop
paths-ignore:
- '**.md'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run lint
- run: pnpm run test
23 changes: 22 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## v1.0.1

[compare changes](https://github.com/zAlweNy26/ts-cat/compare/v1.0.0...v1.0.1)

### 🚀 Enhancements

- Add CI workflow ([dcd61b6](https://github.com/zAlweNy26/ts-cat/commit/dcd61b6))

### 🩹 Fixes

- Update plugin requirements installation ([9f82886](https://github.com/zAlweNy26/ts-cat/commit/9f82886))
- Fastify log levels ([8ea41f0](https://github.com/zAlweNy26/ts-cat/commit/8ea41f0))

### 📖 Documentation

- Update README ([66707ab](https://github.com/zAlweNy26/ts-cat/commit/66707ab))

### ❤️ Contributors

- zAlweNy26 <[email protected]>

## v1.0.0

### 🏡 Chore
Expand All @@ -8,4 +29,4 @@

### ❤️ Contributors

- Dany <[email protected]>
- zAlweNy26 <[email protected]>
15 changes: 1 addition & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,7 @@

TypeScript version of the [Cheshire Cat AI](https://github.com/zAlweNy26/ts-cat) framework originally made in Python.

## Todos

- [ ] Add built-in CLI.
- [ ] Add git pre-commit hook for linting and testing.
- [ ] Improve plugin external packages installation.
- [ ] Add unit tests.
- [ ] Make forms work.
- [ ] Fix relative imports using `tsconfig-paths`.
- [ ] Improve OpenAPI schema generation using [fastify-type-provider-zod](https://github.com/turkerdev/fastify-type-provider-zod).

## Bugs

- [ ] Fix fastify logger levels.
- [ ] Replace `node --loader ts-node/esm` with `ts-node` when [this is fixed](https://github.com/TypeStrong/ts-node/issues/1997).
Check out the [linked project](https://github.com/zAlweNy26/ts-cat/projects?query=is%3Aopen) for more information on what's being worked on.

## Pre-requisites

Expand Down
9 changes: 3 additions & 6 deletions src/mad_hatter/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,12 @@ export class Plugin {
const requirementsPath = join(this.path, 'requirements.txt')
if (existsSync(requirementsPath)) {
const requirements = await readFile(requirementsPath, 'utf-8')
const names = requirements.split('\n').map(req => req.trim().split('=')[0]!)
const names = requirements.split('\n').map(req => req.trim().split('@')[0]!)
try {
execSync(`npm list ${names.join(' ')}`).toString()
execSync(`npm list ${names.join(' ')}`, { cwd: this.path }).toString()
}
catch (error) {
const pkgs = requirements.split('\n').map((req) => {
const [name, version] = req.trim().split('=')
return name ? `${name}@${version || 'latest'}` : ''
}).join(' ')
const pkgs = requirements.split('\n').join(' ')
try { execSync(`pnpm i ${pkgs}`, { cwd: this.path }) }
catch (error) { log.error(`Error installing requirements for ${this.id}: ${error}`) }
}
Expand Down
9 changes: 4 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ const fastify = Fastify({
level: parsedEnv.logLevel,
customLevels: {
error: 60,
warning: 40,
normal: 30,
info: 20,
debug: 0,
warning: 50,
normal: 40,
info: 30,
debug: 20,
},
levelComparison: 'DESC',
transport: {
target: '@mgcrea/pino-pretty-compact',
options: {
Expand Down
5 changes: 5 additions & 0 deletions test/mad_hatter/mad-hatter.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { expect, it } from 'vitest'

it('test main modules', async () => {
expect(1 + 1).toBe(2)
})

0 comments on commit c489482

Please sign in to comment.