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: v3.0.4
Choose a base ref
...
head repository: jaywcjlove/tsbb
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.1.0
Choose a head ref
  • 13 commits
  • 33 files changed
  • 3 contributors

Commits on Sep 3, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bddbfae View commit details

Commits on Sep 7, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    98235be View commit details
  2. Copy the full SHA
    8ece114 View commit details
  3. Copy the full SHA
    7f69d51 View commit details
  4. Copy the full SHA
    30e44e7 View commit details
  5. chore: add umd example.

    jaywcjlove committed Sep 7, 2021
    Copy the full SHA
    7253da3 View commit details
  6. Copy the full SHA
    844f8a4 View commit details
  7. chore(deps): update dependency @types/compression to v1.7.2 (#265)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Sep 7, 2021
    Copy the full SHA
    0f9f72d View commit details
  8. fix(deps): update dependency @types/babel__core to v7.1.16 (#264)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Sep 7, 2021
    Copy the full SHA
    fb9d546 View commit details
  9. chore(deps): update dependency @types/react to v17.0.20 (#263)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Sep 7, 2021
    Copy the full SHA
    ad6a61e View commit details
  10. fix(deps): update dependency @babel/core to v7.15.5 (#262)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Sep 7, 2021
    Copy the full SHA
    488bfc8 View commit details
  11. doc: Update README.md

    jaywcjlove committed Sep 7, 2021
    Copy the full SHA
    e3c5d04 View commit details
  12. released v3.1.0

    jaywcjlove committed Sep 7, 2021
    Copy the full SHA
    34bf24b View commit details
4 changes: 4 additions & 0 deletions .github/workflows/ci.dev.yml
Original file line number Diff line number Diff line change
@@ -61,3 +61,7 @@ jobs:
- name: example @example/transform-typescript
working-directory: example/transform-typescript
run: npm run build

- name: example @example/umd
working-directory: example/umd
run: npm run build
44 changes: 29 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -33,14 +33,14 @@ jobs:
working-directory: example/express
run: npm run build

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

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

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

- name: example @example/koa
working-directory: example/koa
run: npm run build
@@ -61,9 +61,13 @@ jobs:
working-directory: example/transform-typescript
run: npm run build

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

- name: Is a tag created auto?
id: create_tag
uses: jaywcjlove/create-tag-action@v1.2.0
uses: jaywcjlove/create-tag-action@v1.2.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
package-path: ./packages/tsbb/package.json
@@ -99,39 +103,49 @@ jobs:
- run: mkdir -p zip

- name: Compress basic Example.
run: zip -r -y basic.zip . -x "node_modules/*" -x "build/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
run: zip -r -y basic.zip . -x "node_modules/*" -x "build/*" -x "lib/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
working-directory: example/basic
- run: cp -rp example/basic/basic.zip ./zip

- name: Compress express Example.
run: zip -r -y express.zip . -x "node_modules/*" -x "build/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
run: zip -r -y express.zip . -x "node_modules/*" -x "build/*" -x "lib/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
working-directory: example/express
- run: cp -rp example/express/express.zip ./zip

- name: Compress express-typeorm Example.
run: zip -r -y express-typeorm.zip . -x "node_modules/*" -x "build/*" -x "lib/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
working-directory: example/express-typeorm
- run: cp -rp example/express-typeorm/express-typeorm.zip ./zip

- name: Compress hapi Example.
run: zip -r -y hapi.zip . -x "node_modules/*" -x "build/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
run: zip -r -y hapi.zip . -x "node_modules/*" -x "build/*" -x "lib/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
working-directory: example/hapi
- run: cp -rp example/hapi/hapi.zip ./zip

- name: Compress koa Example.
run: zip -r -y koa.zip . -x "node_modules/*" -x "build/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
run: zip -r -y koa.zip . -x "node_modules/*" -x "build/*" -x "lib/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
working-directory: example/koa
- run: cp -rp example/koa/koa.zip ./zip

- name: Compress react-component Example.
run: zip -r -y react-component.zip . -x "node_modules/*" -x "build/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
run: zip -r -y react-component.zip . -x "node_modules/*" -x "build/*" -x "lib/*" -x "esm/*" -x "dist/*" -x "doc/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
working-directory: example/react-component
- run: cp -rp example/react-component/react-component.zip ./zip

- name: Compress react-component-tsx Example.
run: zip -r -y react-component-tsx.zip . -x "node_modules/*" -x "build/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
run: zip -r -y react-component-tsx.zip . -x "node_modules/*" -x "build/*" -x "lib/*" -x "esm/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
working-directory: example/react-component-tsx
- run: cp -rp example/react-component-tsx/react-component-tsx.zip ./zip

- name: Compress express-typeorm Example.
run: zip -r -y express-typeorm.zip . -x "node_modules/*" -x "build/*.sqlite" -x "build/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
working-directory: example/express-typeorm
- run: cp -rp example/express-typeorm/express-typeorm.zip ./zip
- name: Compress transform-typescript Example.
run: zip -r -y transform-typescript.zip . -x "node_modules/*" -x "build/*" -x "lib/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
working-directory: example/transform-typescript
- run: cp -rp example/transform-typescript/transform-typescript.zip ./zip

- name: Compress umd Example.
run: zip -r -y umd.zip . -x "node_modules/*" -x "build/*.sqlite" -x "build/*" -x "lib/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
working-directory: example/umd
- run: cp -rp example/umd/umd.zip ./zip

- name: Compress TSBB Example Download webpage.
working-directory: zip
4 changes: 2 additions & 2 deletions example/basic/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@template/basic",
"private": true,
"version": "3.0.4",
"version": "3.1.0",
"description": "Basic Example.",
"scripts": {
"start": "node lib/index.js",
@@ -17,6 +17,6 @@
"keywords": [],
"license": "MIT",
"devDependencies": {
"tsbb": "^3.0.4"
"tsbb": "^3.1.0"
}
}
8 changes: 4 additions & 4 deletions example/express-typeorm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@template/express-typeorm",
"version": "3.0.4",
"version": "3.1.0",
"private": true,
"description": "Express Typeorm Example.",
"scripts": {
@@ -26,16 +26,16 @@
"delay": "2500"
},
"devDependencies": {
"@types/compression": "1.7.1",
"@types/compression": "1.7.2",
"@types/cookie-parser": "1.4.2",
"@types/express": "4.17.13",
"@types/express-session": "1.17.4",
"@types/http-errors": "1.8.1",
"@types/node": "16.6.2",
"@types/node": "16.7.10",
"nodemon": "2.0.12",
"ts-node": "10.2.1",
"ts-node-dev": "1.1.8",
"tsbb": "^3.0.4"
"tsbb": "^3.1.0"
},
"dependencies": {
"compression": "1.7.4",
1 change: 1 addition & 0 deletions example/express-typeorm/src/main.ts
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ const env = dotenv.config();
async function run() {
try {
const entities = await getEntity();
console.log('entities:', entities);
if (!env.parsed) env.parsed = {};
const options: PostgresConnectionOptions = {
type: 'postgres',
2 changes: 1 addition & 1 deletion example/express-typeorm/src/utils/entity.ts
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import fs from 'fs';

export async function getEntity(entityPath: string = '../entity') {
const dirPath = path.resolve(__dirname, entityPath);
const dirArr = (await fs.promises.readdir(dirPath)).filter((fileName) => !/\.js\.map$/.test(fileName));
const dirArr = (await fs.promises.readdir(dirPath)).filter((fileName) => !/(.js.map|.d.ts)$/.test(fileName));
const arr: string[] = [];
dirArr.forEach((fileName) => {
const ePath = path.resolve(dirPath, fileName).replace(/\.(js|ts)$/, '');
6 changes: 3 additions & 3 deletions example/express/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@template/express",
"version": "3.0.4",
"version": "3.1.0",
"private": true,
"description": "Express Example.",
"scripts": {
@@ -27,13 +27,13 @@
"delay": "2500"
},
"devDependencies": {
"@types/compression": "1.7.1",
"@types/compression": "1.7.2",
"@types/cookie-parser": "1.4.2",
"@types/express": "4.17.13",
"@types/http-errors": "1.8.1",
"nodemon": "2.0.12",
"ts-node-dev": "1.1.8",
"tsbb": "^3.0.4"
"tsbb": "^3.1.0"
},
"dependencies": {
"compression": "1.7.4",
6 changes: 3 additions & 3 deletions example/hapi/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@template/hapi",
"version": "3.0.4",
"version": "3.1.0",
"private": true,
"description": "hapi Example.",
"main": "index.js",
"scripts": {
"start": "node lib/app.js",
"start": "npm run build && node lib/app.js",
"dev": "nodemon --inspect lib/app.js",
"watch": "tsbb watch --entry ./src/app.ts --no-esm",
"build": "tsbb build --entry ./src/app.ts --no-esm",
@@ -30,7 +30,7 @@
"devDependencies": {
"@types/hapi__hapi": "20.0.9",
"nodemon": "2.0.12",
"tsbb": "^3.0.4"
"tsbb": "^3.1.0"
},
"dependencies": {
"@babel/runtime": "7.15.4",
6 changes: 3 additions & 3 deletions example/koa/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@template/koa",
"version": "3.0.4",
"version": "3.1.0",
"private": true,
"description": "Koa Example",
"scripts": {
"start": "node lib/app.js",
"start": "npm run build && node lib/app.js",
"dev": "nodemon --inspect lib/app.js",
"watch": "tsbb watch --entry ./src/app.ts --no-esm",
"build": "tsbb build --entry ./src/app.ts --no-esm",
@@ -28,7 +28,7 @@
"devDependencies": {
"@types/koa": "2.13.4",
"nodemon": "2.0.12",
"tsbb": "^3.0.4"
"tsbb": "^3.1.0"
},
"dependencies": {
"koa": "2.13.1"
5 changes: 4 additions & 1 deletion example/react-component-tsx/.gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
node_modules
lib
esm
build
node_modules
__snapshots__

npm-debug.log*
package-lock.json

.DS_Store
.cache
.rdoc-dist
8 changes: 5 additions & 3 deletions example/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": "3.0.4",
"version": "3.1.0",
"description": "React Component Example for TypeScript.",
"private": true,
"main": "lib/index.js",
@@ -13,6 +13,8 @@
"css:build": "compile-less -d src -o esm",
"css:watch": "compile-less -d src -o esm --watch",
"css:build:dist": "compile-less -d src --combine lib/dist.css --rm-global",
"test": "tsbb test",
"coverage": "tsbb test --coverage",
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\""
},
"repository": {
@@ -41,7 +43,7 @@
"@kkt/raw-modules": "6.11.0",
"@kkt/scope-plugin-options": "6.11.0",
"@tsbb/babel-preset-tsbb": "1.14.2",
"@types/react": "17.0.19",
"@types/react": "17.0.20",
"@types/react-dom": "17.0.9",
"compile-less-cli": "1.8.8",
"husky": "7.0.2",
@@ -50,7 +52,7 @@
"prettier": "2.3.2",
"react": "17.0.2",
"react-dom": "17.0.2",
"tsbb": "^3.0.4"
"tsbb": "^3.1.0"
},
"eslintConfig": {
"extends": [
23 changes: 23 additions & 0 deletions example/react-component-tsx/test/index.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* eslint-disable jest/no-conditional-expect */
import React from 'react';
import TestRenderer from 'react-test-renderer';
import Button from '../src';

describe('<Button />', () => {
it('Should output a Button', () => {
const component = TestRenderer.create(
<Button type="danger">BUTTON</Button>
);
let tree = component.toJSON();
expect(tree).toMatchSnapshot();
if (tree) {
expect(tree.type).toBe('button');
expect(tree.props.className).toBe('w-btn w-btn-default w-btn-danger');
expect(tree.children).toHaveLength(1);
if (tree.children) {
expect(tree.children[0].type).toBe('span');
expect(tree.children[0].children[0]).toEqual('BUTTON');
}
}
});
});
6 changes: 3 additions & 3 deletions example/react-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@template/react-component",
"version": "3.0.4",
"version": "3.1.0",
"private": true,
"description": "React Component Example.",
"scripts": {
@@ -34,15 +34,15 @@
"@babel/plugin-transform-modules-umd": "7.14.5",
"@babel/plugin-transform-runtime": "7.15.0",
"@babel/runtime": "7.15.4",
"@parcel/transformer-less": "2.0.0-rc.0",
"@parcel/transformer-less": "2.0.0-alpha.3",
"@tsbb/babel-preset-tsbb": "1.14.2",
"babel-plugin-transform-remove-imports": "1.5.5",
"babel-plugin-transform-rename-import": "2.3.0",
"compile-less-cli": "1.8.8",
"less": "4.1.1",
"parcel": "2.0.0-rc.0",
"react-test-renderer": "17.0.2",
"tsbb": "^3.0.4"
"tsbb": "^3.1.0"
},
"dependencies": {
"@parcel/transformer-react-refresh-wrap": "2.0.0-alpha.3",
5 changes: 2 additions & 3 deletions example/transform-typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "@template/transform-typescript",
"private": true,
"version": "3.0.4",
"version": "3.1.0",
"description": "Transform Typescript Example.",
"scripts": {
"start": "node lib/index.js",
"watch": "tsbb watch --disable-babel-option --no-esm",
"build": "tsbb build --disable-babel-option --no-esm",
"test": "tsbb test",
@@ -18,6 +17,6 @@
"keywords": [],
"license": "MIT",
"devDependencies": {
"tsbb": "^3.0.4"
"tsbb": "^3.1.0"
}
}
Loading