Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jaywcjlove/tsbb
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.0.3
Choose a base ref
...
head repository: jaywcjlove/tsbb
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.0.4
Choose a head ref
  • 2 commits
  • 22 files changed
  • 1 contributor

Commits on Mar 29, 2023

  1. Copy the full SHA
    1cce5b4 View commit details
  2. released v4.0.4

    jaywcjlove committed Mar 29, 2023
    Copy the full SHA
    3e0ffa1 View commit details
4 changes: 2 additions & 2 deletions examples/babel-transform-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@template/babel-transform-ts",
"private": true,
"version": "4.0.3",
"version": "4.0.4",
"description": "Transform Typescript Example.",
"scripts": {
"watch": "tsbb watch 'src/**/*.ts' --use-babel --no-esm",
@@ -17,6 +17,6 @@
"keywords": [],
"license": "MIT",
"devDependencies": {
"tsbb": "4.0.3"
"tsbb": "4.0.4"
}
}
4 changes: 2 additions & 2 deletions examples/basic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@template/basic",
"version": "4.0.3",
"version": "4.0.4",
"description": "Basic Example.",
"license": "MIT",
"private": true,
@@ -17,6 +17,6 @@
},
"keywords": [],
"devDependencies": {
"tsbb": "4.0.3"
"tsbb": "4.0.4"
}
}
6 changes: 6 additions & 0 deletions examples/basic/src/test/sum.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

import { sum } from './sum';

it('sum 2 test case', async () => {
expect(sum(1, 1)).toEqual(3);
});
2 changes: 1 addition & 1 deletion examples/basic/src/test/sum.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@


export function sum(a: number, b: string) {
export function sum(a: number, b: number) {
return a + b + (a);
}
4 changes: 2 additions & 2 deletions examples/express/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@template/express",
"version": "4.0.3",
"version": "4.0.4",
"private": true,
"description": "Express Example.",
"scripts": {
@@ -31,7 +31,7 @@
"@types/http-errors": "~2.0.1",
"nodemon": "~2.0.22",
"ts-node-dev": "~2.0.0",
"tsbb": "4.0.3"
"tsbb": "4.0.4"
},
"dependencies": {
"compression": "~1.7.4",
4 changes: 2 additions & 2 deletions examples/hapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@template/hapi",
"version": "4.0.3",
"version": "4.0.4",
"private": true,
"description": "hapi Example.",
"main": "index.js",
@@ -29,7 +29,7 @@
},
"devDependencies": {
"nodemon": "~2.0.22",
"tsbb": "4.0.3"
"tsbb": "4.0.4"
},
"dependencies": {
"@hapi/hapi": "^21.3.0"
4 changes: 2 additions & 2 deletions examples/koa/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@template/koa",
"version": "4.0.3",
"version": "4.0.4",
"private": true,
"description": "Koa Example",
"scripts": {
@@ -28,7 +28,7 @@
"devDependencies": {
"@types/koa": "^2.13.5",
"nodemon": "~2.0.22",
"tsbb": "4.0.3"
"tsbb": "4.0.4"
},
"dependencies": {
"koa": "^2.14.1"
4 changes: 2 additions & 2 deletions examples/react-component-tsx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@template/react-component-tsx",
"version": "4.0.3",
"version": "4.0.4",
"description": "React Component Example for TypeScript.",
"private": true,
"main": "lib/index.js",
@@ -51,7 +51,7 @@
"prettier": "^2.8.6",
"react": "~18.2.0",
"react-dom": "~18.2.0",
"tsbb": "4.0.3"
"tsbb": "4.0.4"
},
"eslintConfig": {
"extends": [
4 changes: 2 additions & 2 deletions examples/react-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@template/react-component",
"version": "4.0.3",
"version": "4.0.4",
"private": true,
"description": "React Component Example.",
"scripts": {
@@ -43,7 +43,7 @@
"less": "~4.1.3",
"parcel": "~2.8.3",
"react-test-renderer": "~18.2.0",
"tsbb": "4.0.3"
"tsbb": "4.0.4"
},
"dependencies": {
"@parcel/transformer-react-refresh-wrap": "~2.8.3",
5 changes: 5 additions & 0 deletions examples/react-component/src/sum.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { sum } from './sum';

it('sum 2 test case', async () => {
expect(sum(1, 1)).toEqual(2);
});
4 changes: 2 additions & 2 deletions examples/typenexus/package.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"name": "@template/typenexus",
"private": true,
"type": "module",
"version": "4.0.3",
"version": "4.0.4",
"description": "TypeNexus Example.",
"scripts": {
"start": "npm run build && node dist/main.js",
@@ -32,6 +32,6 @@
"supertest": "^6.3.3",
"supertest-session": "^4.1.0",
"ts-node": "^10.9.1",
"tsbb": "4.0.3"
"tsbb": "4.0.4"
}
}
4 changes: 2 additions & 2 deletions examples/umd/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@template/umd",
"private": true,
"version": "4.0.3",
"version": "4.0.4",
"description": "UMD Example.",
"scripts": {
"watch": "tsbb watch",
@@ -16,6 +16,6 @@
"keywords": [],
"license": "MIT",
"devDependencies": {
"tsbb": "4.0.3"
"tsbb": "4.0.4"
}
}
4 changes: 2 additions & 2 deletions examples/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@template/vue",
"private": true,
"version": "4.0.3",
"version": "4.0.4",
"description": "",
"main": "./cjs/index.js",
"module": "./esm/index.js",
@@ -15,6 +15,6 @@
"vue": "^3.0.0"
},
"devDependencies": {
"tsbb": "4.0.3"
"tsbb": "4.0.4"
}
}
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.0.3",
"version": "4.0.4",
"packages": ["examples/*", "packages/*"],
"useWorkspaces": true
}
4 changes: 2 additions & 2 deletions packages/babel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tsbb/babel",
"version": "4.0.3",
"version": "4.0.4",
"description": "TSBB is a zero-config CLI that helps you develop, test, and publish modern TypeScript project.",
"author": "kenny wang <wowohoo@qq.com>",
"homepage": "https://jaywcjlove.github.io/tsbb",
@@ -38,7 +38,7 @@
"@babel/preset-env": "~7.20.2",
"@babel/preset-react": "~7.18.6",
"@babel/preset-typescript": "~7.21.0",
"@tsbb/typescript": "4.0.3",
"@tsbb/typescript": "4.0.4",
"@types/babel__core": "^7.20.0",
"@types/semver": "~7.3.13",
"@vue/babel-plugin-jsx": "~1.1.1",
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tsbb/core",
"version": "4.0.3",
"version": "4.0.4",
"description": "TSBB is a zero-config CLI that helps you develop, test, and publish modern TypeScript project.",
"author": "kenny wang <wowohoo@qq.com>",
"homepage": "https://jaywcjlove.github.io/tsbb",
@@ -32,9 +32,9 @@
"node": ">=16.0.0"
},
"dependencies": {
"@tsbb/babel": "4.0.3",
"@tsbb/jest": "4.0.3",
"@tsbb/typescript": "4.0.3",
"@tsbb/babel": "4.0.4",
"@tsbb/jest": "4.0.4",
"@tsbb/typescript": "4.0.4",
"@types/fs-extra": "^11.0.1",
"chokidar": "~3.5.3",
"fs-extra": "^11.1.1",
3 changes: 3 additions & 0 deletions packages/core/src/watcher/copyFiles.ts
Original file line number Diff line number Diff line change
@@ -17,6 +17,9 @@ export const watcherCopyFiles = (entry: string[] = [], options: CopyFilesOptions
persistent: true,
});
watcher.on('all', async (eventName, filepath, stats) => {
if (/\.(test|spec)\.(js|jsx|ts|tsx)$/i.test(filepath)) {
return;
}
if (
!/\.(m?js|jsx?|m?ts|tsx?|c?js)$/i.test(filepath) &&
rootDirsRelative &&
4 changes: 2 additions & 2 deletions packages/create-tsbb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-tsbb",
"version": "4.0.3",
"version": "4.0.4",
"description": "Creates a TSBB application using the command line.",
"homepage": "https://jaywcjlove.github.io/tsbb/create-tsbb.html",
"author": "Kenny Wong <wowohoo@qq.com> (https://github.com/jaywcjlove)",
@@ -55,6 +55,6 @@
},
"devDependencies": {
"cpy": "^9.0.1",
"tsbb": "4.0.3"
"tsbb": "4.0.4"
}
}
2 changes: 1 addition & 1 deletion packages/jest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tsbb/jest",
"version": "4.0.3",
"version": "4.0.4",
"description": "TSBB is a zero-config CLI that helps you develop, test, and publish modern TypeScript project.",
"author": "kenny wang <wowohoo@qq.com>",
"homepage": "https://jaywcjlove.github.io/tsbb",
4 changes: 2 additions & 2 deletions packages/tsbb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tsbb",
"version": "4.0.3",
"version": "4.0.4",
"description": "TSBB is a zero-config CLI that helps you develop, test, and publish modern TypeScript project.",
"author": "kenny wang <wowohoo@qq.com>",
"homepage": "https://jaywcjlove.github.io/tsbb",
@@ -33,6 +33,6 @@
"node": ">=16.0.0"
},
"dependencies": {
"@tsbb/core": "4.0.3"
"@tsbb/core": "4.0.4"
}
}
2 changes: 1 addition & 1 deletion packages/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tsbb/typescript",
"version": "4.0.3",
"version": "4.0.4",
"description": "TSBB is a zero-config CLI that helps you develop, test, and publish modern TypeScript project.",
"author": "kenny wang <wowohoo@qq.com>",
"homepage": "https://jaywcjlove.github.io/tsbb",
3 changes: 2 additions & 1 deletion packages/typescript/src/index.ts
Original file line number Diff line number Diff line change
@@ -83,7 +83,8 @@ export default async function compile(options: TsCompileOptions = {}) {
if (parseResult.errors.length) {
return parseResult.errors.forEach(reportDiagnostic);
}

// Test files are not escaped.
parseResult.fileNames = parseResult.fileNames.filter((item) => !/\.(test|spec)\.(js|jsx|ts|tsx)$/i.test(item));
const currentDir = ts.sys.getCurrentDirectory();
const rootDirsRelative = [...new Set(getRootsFolderName(parseResult.fileNames))];
const outputDir = path.resolve(currentDir, compilerOptions.outDir || 'lib');