Skip to content

Commit

Permalink
Merge pull request #120 from thefrontside/try-rollup
Browse files Browse the repository at this point in the history
Use tsdx to build without transpiling generators
  • Loading branch information
cowboyd authored May 18, 2020
2 parents 5e9c55b + 66d8db0 commit aedd0f4
Show file tree
Hide file tree
Showing 12 changed files with 2,753 additions and 675 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@
},
"scripts": {
"clean": "git clean -dxf",
"postinstall": "patch-package",
"prepack": "yarn workspaces run prepack",
"test": "yarn workspaces run test",
"lint": "yarn workspaces run lint"
},
"volta": {
"node": "12.11.1",
"yarn": "1.19.1"
},
"devDependencies": {
"patch-package": "6.2.2"
}
}
1 change: 1 addition & 0 deletions packages/effection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@babel/core": "7.4.4",
"@babel/plugin-proposal-class-properties": "^7.7.0",
"@babel/preset-env": "7.4.4",
"@babel/preset-modules": "0.1.3",
"@babel/register": "7.4.4",
"@types/mocha": "^5.2.6",
"babel-eslint": "10.0.1",
Expand Down
5 changes: 1 addition & 4 deletions packages/effection/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
"strictNullChecks": true,
"strictFunctionTypes": true,
"noEmit": true,

// If the library is an external module (uses `export`), this allows your test file to import "mylib" instead of "./index".
// If the library is global (cannot be imported via `import` or `require`), leave this out.
"baseUrl": "."
"skipLibCheck": true
}
}
4 changes: 3 additions & 1 deletion packages/events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Helpers for listening to events with effection",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"module": "dist/events.esm.js",
"repository": "https://github.com/thefrontside/bigtest.git",
"author": "Frontside Engineering <[email protected]>",
"license": "MIT",
Expand All @@ -15,7 +16,7 @@
"scripts": {
"lint": "echo [skip @effection/events]",
"test": "mocha -r ts-node/register test/**/*.test.ts",
"prepack": "tsc --outdir dist --project tsconfig.dist.json",
"prepack": "tsdx build --tsconfig tsconfig.dist.json",
"mocha": "mocha -r ts-node/register"
},
"devDependencies": {
Expand All @@ -24,6 +25,7 @@
"expect": "^25.4.0",
"mocha": "^7.1.1",
"ts-node": "^8.9.0",
"tsdx": "0.13.2",
"typescript": "^3.7.0"
},
"peerDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions packages/events/tsconfig.dist.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"module": "esnext"
},
"exclude": ["./test/*"]
}
5 changes: 3 additions & 2 deletions packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
],
"scripts": {
"lint": "echo [skip @effection/node]",
"test": "mocha -r ts-node/register test/**/*.test.ts",
"prepack": "tsc --outdir dist --project tsconfig.dist.json",
"test": "mocha -r ts-node/register --timeout 5000 test/**/*.test.ts",
"prepack": "tsdx build --target node --format cjs --tsconfig tsconfig.dist.json",
"mocha": "mocha -r ts-node/register"
},
"devDependencies": {
Expand All @@ -27,6 +27,7 @@
"mocha": "^7.1.1",
"node-fetch": "^2.6.0",
"ts-node": "^8.9.0",
"tsdx": "0.13.2",
"typescript": "^3.7.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/child_process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function *supervise(child: ChildProcess) { // eslint-disable-line @typescript-es
}

export function *spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptions): Operation {
let child = childProcess.spawn(command, args, Object.assign({}, options, {
let child = childProcess.spawn(command, args || [], Object.assign({}, options, {
shell: true,
detached: true,
}));
Expand Down
2 changes: 1 addition & 1 deletion packages/node/test/child_process.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('child_process', () => {

beforeEach(async () => {
child = await World.spawn(spawnProcess('node', ['./echo-server.js'], {
env: { PORT: '29000' },
env: { PORT: '29000', PATH: process.env.PATH },
stdio: "pipe",
cwd: __dirname,
}));
Expand Down
3 changes: 3 additions & 0 deletions packages/node/tsconfig.dist.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"module": "esnext"
},
"exclude": ["./test/*"]
}
1 change: 0 additions & 1 deletion packages/node/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "@frontside/tsconfig",
"include": [
"src/**/*.ts",
"bin/*.ts",
"test/**/*.ts"
]
}
15 changes: 15 additions & 0 deletions patches/tsdx+0.13.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/node_modules/tsdx/dist/babelPluginTsdx.js b/node_modules/tsdx/dist/babelPluginTsdx.js
index 57d9c93..418a103 100644
--- a/node_modules/tsdx/dist/babelPluginTsdx.js
+++ b/node_modules/tsdx/dist/babelPluginTsdx.js
@@ -73,10 +73,6 @@ exports.babelPluginTsdx = rollup_plugin_babel_1.default.custom(() => ({
{ name: '@babel/plugin-proposal-optional-chaining' },
// Adds syntax support for default value using ?? operator
{ name: '@babel/plugin-proposal-nullish-coalescing-operator' },
- {
- name: '@babel/plugin-transform-regenerator',
- async: false,
- },
{
name: 'babel-plugin-macros',
},
Loading

0 comments on commit aedd0f4

Please sign in to comment.