-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🔧 Update build process to use references #44
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,26 @@ jobs: | |
|
||
- uses: pre-commit/action@v1.0.1 | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Read .nvmrc and pass it on | ||
run: echo ::set-output name=NVMRC::$(cat .nvmrc) | ||
id: nvm | ||
|
||
- name: Setup node w/ nvm version | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '${{ steps.nvm.outputs.NVMRC }}' | ||
|
||
- name: yarn install w/ cache | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: Run tsc build | ||
run: yarn build | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -75,9 +95,6 @@ jobs: | |
- name: Install Packages | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Test | ||
run: yarn test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Found that we missed this as this stage relies on it already. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, I'm still iffy on trusting another machine with different installs potentially passed the build and using that as justification here that we're good. probably enough of an edge case to justify removing this (could use frozen-lockfile in master/push condition also, potentially). |
||
|
||
- name: Authenticate with Registry | ||
run: | | ||
yarn logout | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ coverage/ | |
|
||
# output for tsc compile | ||
lib/ | ||
*.tsbuildinfo |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,13 @@ | |
"scripts": { | ||
"test": "yarn lint && yarn lerna run test", | ||
"lint": "yarn eslint && yarn type", | ||
"eslint": "eslint . --ext .js,.ts --max-warnings 0", | ||
"eslint": "eslint . --ext .js,.ts --max-warnings 0 --report-unused-disable-directives", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. surprised this isn't more obvious/a best practice. why haven't I been using this? |
||
"type": "tsc --noEmit", | ||
"fmt": "pre-commit run --all-files && yarn eslint --fix", | ||
"build": "lerna run tsc", | ||
"cleanBuilds": "find ./packages -type d -name lib -prune -exec rm -rf {} \\;", | ||
"cleanbuilds": "yarn cleanBuilds:out && yarn cleanBuilds:buildinfo", | ||
"cleanBuilds:out": "find ./packages -type d -name lib -prune -exec rm -rf {} \\;", | ||
"cleanBuilds:buildinfo": "find ./packages -type f -name tsconfig.build.tsbuildinfo -prune -exec rm {} \\;", | ||
"lerna:version": "lerna version --no-push", | ||
"lerna:publish": "lerna publish from-package" | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
"directory": "packages/blocks" | ||
}, | ||
"scripts": { | ||
"tsc": "tsc -p ./tsconfig.build.json", | ||
"tsc": "tsc -b ./tsconfig.build.json", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. -b is for incremental builds https://www.typescriptlang.org/docs/handbook/project-references.html |
||
"test": "jest" | ||
}, | ||
"author": "", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": ["./**/*.spec.ts"] | ||
"extends": "../../tsconfig.build.json", | ||
"include": ["./src"], | ||
"exclude": ["./**/*.spec.ts"], | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./lib", | ||
"composite": true | ||
}, | ||
"references": [] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./lib" | ||
}, | ||
"include": ["./src"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": ["./**/*.spec.ts"] | ||
"extends": "../../tsconfig.build.json", | ||
"include": ["./src"], | ||
"exclude": ["./**/*.spec.ts"], | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./lib", | ||
"composite": true | ||
}, | ||
"references": [ | ||
{ | ||
"path": "../jest-mock-web-client/tsconfig.build.json" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Important to reference the |
||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./lib" | ||
}, | ||
"include": ["./src"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": ["./**/*.spec.ts"] | ||
"extends": "../../tsconfig.build.json", | ||
"include": ["./src"], | ||
"exclude": ["./**/*.spec.ts"], | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./lib", | ||
"composite": true | ||
}, | ||
"references": [] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./lib" | ||
}, | ||
"include": ["./src"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,4 @@ import * as events from './events'; | |
import fields from './fields'; | ||
import ServerlessTester from './serverless-tester'; | ||
|
||
// Plans to add more fixtures like `web` for responses | ||
// eslint-disable-next-line import/prefer-default-export | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎉 ✨ |
||
export { events, fields, ServerlessTester }; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": ["./**/*.spec.ts"] | ||
"extends": "../../tsconfig.build.json", | ||
"include": ["./src"], | ||
"exclude": ["./**/*.spec.ts"], | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./lib", | ||
"composite": true | ||
}, | ||
"references": [] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./lib" | ||
}, | ||
"include": ["./src"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": ["./**/*.spec.ts"] | ||
"extends": "../../tsconfig.build.json", | ||
"include": ["./src"], | ||
"exclude": ["./**/*.spec.ts"], | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./lib", | ||
"composite": true | ||
}, | ||
"references": [ | ||
{ | ||
"path": "../jest-mock-web-client/tsconfig.build.json" | ||
}, | ||
{ | ||
"path": "../fixtures/tsconfig.build.json" | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./lib" | ||
}, | ||
"include": ["./src"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": ["./**/*.spec.ts"] | ||
"extends": "../../tsconfig.build.json", | ||
"include": ["./src"], | ||
"exclude": ["./**/*.spec.ts"], | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./lib", | ||
"composite": true | ||
}, | ||
"references": [] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./lib" | ||
}, | ||
"include": ["./src"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": ["./**/*.spec.ts"] | ||
"extends": "../../tsconfig.build.json", | ||
"include": ["./src"], | ||
"exclude": ["./**/*.spec.ts"], | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./lib", | ||
"composite": true | ||
}, | ||
"references": [] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./lib" | ||
}, | ||
"include": ["./src"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "src" | ||
} | ||
"rootDir": "src", | ||
"composite": true | ||
}, | ||
"references": [] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"declaration": true, | ||
"module": "commonjs", | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"moduleResolution": "node", | ||
"noImplicitAny": true, | ||
"strict": true, | ||
"preserveSymlinks": true, | ||
"allowJs": true, | ||
"sourceMap": true, | ||
"removeComments": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true | ||
}, | ||
"exclude": ["node_modules", "**/coverage", "**/lib"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,9 @@ | ||
{ | ||
"extends": "./tsconfig.build.json", | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"declaration": true, | ||
"module": "commonjs", | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"moduleResolution": "node", | ||
"noImplicitAny": true, | ||
"strict": true, | ||
"preserveSymlinks": true, | ||
"allowJs": true, | ||
"noLib": false, | ||
"sourceMap": true, | ||
"removeComments": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"paths": { | ||
"@slack-wrench/*": ["packages/*/src"] | ||
} | ||
}, | ||
"exclude": ["node_modules", "**/coverage", "**/lib"] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want this to happen on PR? I guess this way we know explicitly if a PR breaks our build, which I like.
if so, we'll need it to be a required check after merging