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.7
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.8
Choose a head ref
  • 11 commits
  • 21 files changed
  • 1 contributor

Commits on Mar 30, 2023

  1. Copy the full SHA
    cfe784f View commit details
  2. Copy the full SHA
    8f0ee54 View commit details

Commits on Mar 31, 2023

  1. Copy the full SHA
    b9f7773 View commit details
  2. Copy the full SHA
    ef46425 View commit details
  3. Copy the full SHA
    e8923e0 View commit details
  4. Copy the full SHA
    11c4cff View commit details
  5. Copy the full SHA
    49ec723 View commit details
  6. Copy the full SHA
    c3f463d View commit details
  7. Copy the full SHA
    6dc32da View commit details
  8. Copy the full SHA
    3888fe8 View commit details
  9. released v4.0.8

    jaywcjlove committed Mar 31, 2023
    Copy the full SHA
    50e5b1a View commit details
80 changes: 79 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,85 @@ name: Node.js CI
on: push

jobs:
test:
Windows:
name: Windows Node.js ${{ matrix.node-version }}
# Containers must run in Linux based operating systems
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
node-version:
- 18
- 16
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- run: npm install
- run: npm run build
- run: npm install
- run: npm run build:create-tsbb
- run: npm run type-check

- name: copy create-tsbb examples
working-directory: packages/create-tsbb
run: npm run copy

- name: example @example/babel-transform-ts
working-directory: examples/babel-transform-ts
run: npm run build

- name: example @example/basic
working-directory: examples/basic
run: npm run build && npm run coverage

- name: example @example/express
working-directory: examples/express
run: npm run build

- name: example @example/hapi
working-directory: examples/hapi
run: npm run build

- name: example @example/koa
working-directory: examples/koa
run: npm run build

- name: example @example/react-component
working-directory: examples/react-component
env:
CI: true
run: |
npm run build
npm run doc
npm run coverage
- name: example @example/react-component-tsx
working-directory: examples/react-component-tsx
env:
CI: true
run: |
npm run build
npm run doc
npm run coverage
cd lib/
ls -Force
- name: example @example/typenexus
working-directory: examples/typenexus
run: npm run build && npm run coverage

- name: example @example/umd
working-directory: examples/umd
run: npm run build && npm run coverage

- name: example @example/vue
working-directory: examples/vue
run: npm run build

Ubuntu:
name: Ubuntu Node.js ${{ matrix.node-version }}
# Containers must run in Linux based operating systems
runs-on: ubuntu-latest
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,6 @@ jobs:
- run: npm run build
- run: npm install
- run: npm run build:create-tsbb
- run: npm run build:template
- run: npm run type-check

- name: copy create-tsbb examples
@@ -131,6 +130,8 @@ jobs:
```bash
npm i tsbb@${{steps.create_tag.outputs.versionNumber}}
npm i create-tsbb@${{steps.create_tag.outputs.versionNumber}}
npm init tsbb@latest my-app -- --example typenexus
```
${{ steps.changelog.outputs.changelog }}
8 changes: 4 additions & 4 deletions examples/babel-transform-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@template/babel-transform-ts",
"private": true,
"version": "4.0.7",
"version": "4.0.8",
"description": "Transform Typescript Example.",
"scripts": {
"watch": "tsbb watch 'src/**/*.ts' --use-babel --no-esm",
"build": "tsbb build 'src/**/*.ts' --use-babel --no-esm",
"watch": "tsbb watch \"src/**/*.ts\" --use-babel --no-esm",
"build": "tsbb build \"src/**/*.ts\" --use-babel --no-esm",
"test": "tsbb test",
"coverage": "tsbb test --coverage --bail"
},
@@ -17,6 +17,6 @@
"keywords": [],
"license": "MIT",
"devDependencies": {
"tsbb": "4.0.7"
"tsbb": "4.0.8"
}
}
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.7",
"version": "4.0.8",
"description": "Basic Example.",
"license": "MIT",
"private": true,
@@ -17,6 +17,6 @@
},
"keywords": [],
"devDependencies": {
"tsbb": "4.0.7"
"tsbb": "4.0.8"
}
}
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.7",
"version": "4.0.8",
"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.7"
"tsbb": "4.0.8"
},
"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.7",
"version": "4.0.8",
"private": true,
"description": "hapi Example.",
"main": "index.js",
@@ -29,7 +29,7 @@
},
"devDependencies": {
"nodemon": "~2.0.22",
"tsbb": "4.0.7"
"tsbb": "4.0.8"
},
"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.7",
"version": "4.0.8",
"private": true,
"description": "Koa Example",
"scripts": {
@@ -28,7 +28,7 @@
"devDependencies": {
"@types/koa": "^2.13.5",
"nodemon": "~2.0.22",
"tsbb": "4.0.7"
"tsbb": "4.0.8"
},
"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.7",
"version": "4.0.8",
"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.7"
"tsbb": "4.0.8"
},
"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.7",
"version": "4.0.8",
"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.7"
"tsbb": "4.0.8"
},
"dependencies": {
"@parcel/transformer-react-refresh-wrap": "~2.8.3",
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.7",
"version": "4.0.8",
"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.7"
"tsbb": "4.0.8"
}
}
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.7",
"version": "4.0.8",
"description": "UMD Example.",
"scripts": {
"watch": "tsbb watch",
@@ -16,6 +16,6 @@
"keywords": [],
"license": "MIT",
"devDependencies": {
"tsbb": "4.0.7"
"tsbb": "4.0.8"
}
}
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.7",
"version": "4.0.8",
"description": "",
"main": "./cjs/index.js",
"module": "./esm/index.js",
@@ -15,6 +15,6 @@
"vue": "^3.0.0"
},
"devDependencies": {
"tsbb": "4.0.7"
"tsbb": "4.0.8"
}
}
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.7",
"version": "4.0.8",
"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.7",
"version": "4.0.8",
"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.7",
"@tsbb/typescript": "4.0.8",
"@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.7",
"version": "4.0.8",
"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.7",
"@tsbb/jest": "4.0.7",
"@tsbb/typescript": "4.0.7",
"@tsbb/babel": "4.0.8",
"@tsbb/jest": "4.0.8",
"@tsbb/typescript": "4.0.8",
"@types/fs-extra": "^11.0.1",
"chokidar": "~3.5.3",
"fs-extra": "^11.1.1",
26 changes: 19 additions & 7 deletions packages/core/src/compile.ts
Original file line number Diff line number Diff line change
@@ -18,14 +18,26 @@ export async function compile(options: CompileOptions = {}) {
});
}
// ==Use Babel=============================================
const err = [
'\x1b[31;1m When compiling with\x1b[0m\x1b[33;1m Babel\x1b[0m\x1b[31;1m, you need to specify the compilation file, E.g:\x1b[0m\n',
' \x1b[35;1m$\x1b[0m\x1b[36;1m tsbb\x1b[0m build\x1b[33;1m src/*.{jsx,js}\x1b[0m --useBabel',
' \x1b[35;1m$\x1b[0m\x1b[36;1m tsbb\x1b[0m build\x1b[33;1m "src/**/*.ts"\x1b[0m --useBabel',
' \x1b[35;1m$\x1b[0m\x1b[36;1m tsbb\x1b[0m build\x1b[33;1m src/index.jsx\x1b[0m --useBabel',
' \x1b[35;1m$\x1b[0m\x1b[36;1m tsbb\x1b[0m build\x1b[33;1m src/index.jsx\x1b[0m \x1b[33;1m src/main.jsx\x1b[0m --useBabel\n',
];
if (!options.entry?.length) {
const err = [
'\x1b[31;1m When compiling with\x1b[0m\x1b[33;1m Babel\x1b[0m\x1b[31;1m, you need to specify the compilation file, E.g:\x1b[0m\n',
' \x1b[35;1m$\x1b[0m\x1b[36;1m tsbb\x1b[0m build\x1b[33;1m src/*.{jsx,js}\x1b[0m --useBabel',
' \x1b[35;1m$\x1b[0m\x1b[36;1m tsbb\x1b[0m build\x1b[33;1m "src/**/*.ts"\x1b[0m --useBabel',
' \x1b[35;1m$\x1b[0m\x1b[36;1m tsbb\x1b[0m build\x1b[33;1m src/index.jsx\x1b[0m --useBabel',
' \x1b[35;1m$\x1b[0m\x1b[36;1m tsbb\x1b[0m build\x1b[33;1m src/index.jsx\x1b[0m \x1b[33;1m src/main.jsx\x1b[0m --useBabel\n',
' \x1b[31;1mThe command you entered:\x1b[0m\n',
` \x1b[31;1m$ tsbb ${process.argv.slice(2).join(' ')}\x1b[0m\n`,
' \x1b[31;1mThe files you need to compile have been indexed:\x1b[0m\n',
];
(options.entry || []).forEach((fileNames) => err.push(` \x1b[35;1m${fileNames}\x1b[0m`));
!options.entry?.length &&
err.push('\x1b[33;1mNo files were indexed. Please check your command line arguments.\x1b[0m');
if (process.platform === 'win32') {
err.push('\n Please note that on \x1b[33;1mWindows\x1b[0m platform, double(") quotes should be used to ');
err.push(" index file parameters instead of single(') quotes.\n");
err.push(' Correct usage: \x1b[32;1m"src/*.tsx"\x1b[0m');
err.push(" Incorrect usage: \x1b[31;1m'src/*.tsx'\x1b[0m");
}
throw new Error(err.join('\n'));
}
babelTransform(options);
2 changes: 1 addition & 1 deletion packages/core/src/watcher/copyFiles.ts
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ 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) || /\/tsconfig\.json$/i.test(filepath)) {
if (/\.(test|spec)\.(js|jsx|ts|tsx)$/i.test(filepath) || /[/\\]tsconfig\.json$/i.test(filepath)) {
return;
}
if (
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.7",
"version": "4.0.8",
"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.7"
"tsbb": "4.0.8"
}
}
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.7",
"version": "4.0.8",
"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",
Loading