Skip to content

Commit

Permalink
Merge pull request #162 from frouriojs/develop
Browse files Browse the repository at this point in the history
chore(release): 0.24.1
  • Loading branch information
solufa authored Mar 10, 2021
2 parents d24fe88 + a4dc67d commit 3604028
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 193 deletions.
17 changes: 0 additions & 17 deletions .github/dependabot.yml

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.24.1](https://github.com/frouriojs/frourio/compare/v0.24.0...v0.24.1) (2021-03-10)


### Bug Fixes

* update [email protected] ([9ed518e](https://github.com/frouriojs/frourio/commit/9ed518eeb0ed44e282785ce2b42a4c2a1b44f738))

## [0.24.0](https://github.com/frouriojs/frourio/compare/v0.23.1...v0.24.0) (2021-02-28)


Expand Down
6 changes: 6 additions & 0 deletions __test__/unit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ export default defineHooks(() => ({
}))
`
)
rimraf.sync(dir)

fs.mkdirSync(dir)
fs.writeFileSync(`${dir}/$test.ts`, '// test file')
createDefaultFilesIfNotExists(dir)
expect(fs.readdirSync(dir)).toEqual(['$test.ts'])

rimraf.sync(dir)
})
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frourio",
"version": "0.24.0",
"version": "0.24.1",
"description": "Fast and type-safe full stack framework, for TypeScript",
"author": "Solufa <[email protected]>",
"license": "MIT",
Expand Down Expand Up @@ -83,38 +83,38 @@
]
},
"dependencies": {
"aspida": "^1.6.1",
"aspida": "^1.6.3",
"velona": "^0.7.0"
},
"devDependencies": {
"@aspida/axios": "^1.6.1",
"@aspida/node-fetch": "^1.6.1",
"@aspida/axios": "^1.6.3",
"@aspida/node-fetch": "^1.6.3",
"@types/busboy": "^0.2.3",
"@types/jest": "^26.0.20",
"@types/node-fetch": "^2.5.8",
"@types/rimraf": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^4.15.2",
"@typescript-eslint/parser": "^4.15.2",
"@typescript-eslint/eslint-plugin": "^4.17.0",
"@typescript-eslint/parser": "^4.17.0",
"axios": "^0.21.1",
"class-validator": "^0.13.1",
"eslint": "^7.20.0",
"eslint": "^7.21.0",
"eslint-config-prettier": "^8.1.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.5",
"eslint-plugin-jest": "^24.2.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-standard": "^5.0.0",
"fastify": "^3.12.0",
"fastify": "^3.13.0",
"fastify-multipart": "^4.0.0",
"jest": "^26.6.3",
"node-fetch": "^2.6.1",
"prettier": "^2.2.1",
"rimraf": "^3.0.2",
"standard-version": "^9.1.1",
"ts-jest": "^26.5.2",
"ts-jest": "^26.5.3",
"ts-node": "^9.1.1",
"typescript": "^4.2.2"
"typescript": "^4.2.3"
}
}
2 changes: 1 addition & 1 deletion src/createControllersText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ const createFiles = (
...getAdditionalResPath(input, 'hooks')
]

createDefaultFiles(input)
createRelayFile(
input,
appText,
[...additionalReqs, ...getAdditionalResPath(input, 'controller')],
params
)
createDefaultFiles(input)

fs.readdirSync(input, { withFileTypes: true }).forEach(
d =>
Expand Down
6 changes: 4 additions & 2 deletions src/createDefaultFilesIfNotExists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import fs from 'fs'
import path from 'path'

export default (dir: string) => {
const isEmptyDir = fs.readdirSync(dir).length === 0

const indexFilePath = path.join(dir, 'index.ts')

if (!fs.existsSync(indexFilePath)) {
if (isEmptyDir && !fs.existsSync(indexFilePath)) {
fs.writeFileSync(
indexFilePath,
`export type Methods = {
Expand All @@ -19,7 +21,7 @@ export default (dir: string) => {

const controllerFilePath = path.join(dir, 'controller.ts')

if (!fs.existsSync(controllerFilePath)) {
if (isEmptyDir && !fs.existsSync(controllerFilePath)) {
fs.writeFileSync(
controllerFilePath,
`import { defineController } from './$relay'
Expand Down
Loading

0 comments on commit 3604028

Please sign in to comment.