Skip to content
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

feat: enable TypeScript project references #5155

Merged
merged 5 commits into from
Apr 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ matrix:
services:
- mongodb
script:
- npm run postinstall -- --scope "@loopback/test-repository-mongodb" --include-dependencies
- npm run build -- --scope "@loopback/test-repository-mongodb" --include-dependencies
- cd acceptance/repository-mongodb && npm run mocha
- lerna bootstrap --scope "@loopback/test-repository-mongodb" --include-dependencies
- cd acceptance/repository-mongodb && npm test
- node_js: "12"
os: linux
env:
Expand All @@ -68,9 +67,8 @@ matrix:
- mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'test'@'localhost' WITH GRANT OPTION;FLUSH PRIVILEGES;"
- mysql -e "GRANT SUPER ON *.* TO 'test'@'localhost' IDENTIFIED BY 'test';FLUSH PRIVILEGES;"
script:
- npm run postinstall -- --scope "@loopback/test-repository-mysql" --include-dependencies
- npm run build -- --scope "@loopback/test-repository-mysql" --include-dependencies
- cd acceptance/repository-mysql && npm run mocha
- lerna bootstrap --scope "@loopback/test-repository-mysql" --include-dependencies
- cd acceptance/repository-mysql && npm test
- node_js: "12"
os: linux
env:
Expand All @@ -79,18 +77,16 @@ matrix:
services:
- postgresql
script:
- npm run postinstall -- --scope "@loopback/test-repository-postgresql" --include-dependencies
- npm run build -- --scope "@loopback/test-repository-postgresql" --include-dependencies
- lerna bootstrap --scope "@loopback/test-repository-postgresql" --include-dependencies
- psql -U postgres -a -f acceptance/repository-postgresql/test/schema.sql
- cd acceptance/repository-postgresql && npm run mocha
- cd acceptance/repository-postgresql && npm test
- node_js: "12"
os: linux
env:
- TASK=test-repository-cloudant
script:
# set up docker image and create admin for cloudant.
- npm run postinstall -- --scope "@loopback/test-repository-cloudant" --include-dependencies
- npm run build -- --scope "@loopback/test-repository-cloudant" --include-dependencies
- lerna bootstrap --scope "@loopback/test-repository-cloudant" --include-dependencies
- cd acceptance/repository-cloudant && sh setup.sh
- npm test
- node_js: "12"
Expand All @@ -100,9 +96,8 @@ matrix:
services:
- docker
script:
- npm run postinstall -- --scope "@loopback/test-extension-logging-fluentd" --include-dependencies
- npm run build -- --scope "@loopback/test-extension-logging-fluentd" --include-dependencies
- cd acceptance/extension-logging-fluentd && npm run mocha
- lerna bootstrap --scope "@loopback/test-extension-logging-fluentd" --include-dependencies
- cd acceptance/extension-logging-fluentd && npm test

branches:
only:
Expand Down
2 changes: 1 addition & 1 deletion acceptance/extension-logging-fluentd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"scripts": {
"build": "lb-tsc",
"clean": "lb-clean loopback-test-extension-logging-fluentd*.tgz dist tsconfig.build.tsbuildinfo package",
"clean": "lb-clean loopback-test-extension-logging-fluentd*.tgz dist *.tsbuildinfo package",
"pretest": "npm run build",
"test": "npm run mocha",
"mocha": "lb-mocha \"dist/__tests__/**/*.js\"",
Expand Down
9 changes: 0 additions & 9 deletions acceptance/extension-logging-fluentd/tsconfig.build.json

This file was deleted.

23 changes: 23 additions & 0 deletions acceptance/extension-logging-fluentd/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "@loopback/build/config/tsconfig.common.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"composite": true
},
"include": [
"src"
],
"references": [
{
"path": "../../packages/core/tsconfig.json"
},
{
"path": "../../extensions/logging/tsconfig.json"
},
{
"path": "../../packages/testlab/tsconfig.json"
}
]
}
2 changes: 1 addition & 1 deletion acceptance/repository-cloudant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"scripts": {
"build": "lb-tsc",
"clean": "lb-clean loopback-test-repository-cloudant*.tgz dist tsconfig.build.tsbuildinfo package",
"clean": "lb-clean loopback-test-repository-cloudant*.tgz dist *.tsbuildinfo package",
"pretest": "npm run build",
"test": "npm run mocha",
"mocha": "lb-mocha \"dist/__tests__/**/*.js\"",
Expand Down
9 changes: 0 additions & 9 deletions acceptance/repository-cloudant/tsconfig.build.json

This file was deleted.

20 changes: 20 additions & 0 deletions acceptance/repository-cloudant/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "@loopback/build/config/tsconfig.common.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"composite": true
},
"include": [
"src"
],
"references": [
{
"path": "../../packages/repository/tsconfig.json"
},
{
"path": "../../packages/repository-tests/tsconfig.json"
}
]
}
2 changes: 1 addition & 1 deletion acceptance/repository-mongodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"scripts": {
"build": "lb-tsc",
"clean": "lb-clean loopback-test-repository-mongodb*.tgz dist tsconfig.build.tsbuildinfo package",
"clean": "lb-clean loopback-test-repository-mongodb*.tgz dist *.tsbuildinfo package",
"pretest": "npm run build",
"test": "npm run mocha",
"mocha": "lb-mocha \"dist/__tests__/**/*.js\"",
Expand Down
20 changes: 20 additions & 0 deletions acceptance/repository-mongodb/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "@loopback/build/config/tsconfig.common.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"composite": true
},
"include": [
"src"
],
"references": [
{
"path": "../../packages/repository/tsconfig.json"
},
{
"path": "../../packages/repository-tests/tsconfig.json"
}
]
}
2 changes: 1 addition & 1 deletion acceptance/repository-mysql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"scripts": {
"build": "lb-tsc",
"clean": "lb-clean loopback-test-repository-mysql*.tgz dist tsconfig.build.tsbuildinfo package",
"clean": "lb-clean loopback-test-repository-mysql*.tgz dist *.tsbuildinfo package",
"pretest": "npm run build",
"test": "npm run mocha",
"mocha": "lb-mocha \"dist/__tests__/**/*.js\"",
Expand Down
20 changes: 20 additions & 0 deletions acceptance/repository-mysql/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "@loopback/build/config/tsconfig.common.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"composite": true
},
"include": [
"src"
],
"references": [
{
"path": "../../packages/repository/tsconfig.json"
},
{
"path": "../../packages/repository-tests/tsconfig.json"
}
]
}
2 changes: 1 addition & 1 deletion acceptance/repository-postgresql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"scripts": {
"build": "lb-tsc",
"clean": "lb-clean loopback-test-repository-postgresql*.tgz dist tsconfig.build.tsbuildinfo package",
"clean": "lb-clean loopback-test-repository-postgresql*.tgz dist *.tsbuildinfo package",
"pretest": "npm run build",
"test": "npm run mocha",
"mocha": "lb-mocha \"dist/__tests__/**/*.js\"",
Expand Down
9 changes: 0 additions & 9 deletions acceptance/repository-postgresql/tsconfig.build.json

This file was deleted.

20 changes: 20 additions & 0 deletions acceptance/repository-postgresql/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "@loopback/build/config/tsconfig.common.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"composite": true
},
"include": [
"src"
],
"references": [
{
"path": "../../packages/repository/tsconfig.json"
},
{
"path": "../../packages/repository-tests/tsconfig.json"
}
]
}
9 changes: 0 additions & 9 deletions benchmark/tsconfig.build.json

This file was deleted.

26 changes: 26 additions & 0 deletions benchmark/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "@loopback/build/config/tsconfig.common.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"composite": true
},
"include": [
"src"
],
"references": [
{
"path": "../packages/testlab/tsconfig.json"
},
{
"path": "../examples/todo/tsconfig.json"
},
{
"path": "../packages/openapi-spec-builder/tsconfig.json"
},
{
"path": "../packages/rest/tsconfig.json"
}
]
}
Loading