Skip to content

Commit

Permalink
[FAB-8942] fix type definition for 1.1 release
Browse files Browse the repository at this point in the history
Type information in v.1.1.0 is broken and not compilable with tsc.
This CR fix the errors, and add tests with typescript
remove all type definition to 'types' folder

Change-Id: Ia042c94607ab93259872774cd3fb0da60aeb6d05
Signed-off-by: zhaochy <zhaochy_2015@hotmail.com>
  • Loading branch information
zhaochy1990 committed Mar 21, 2018
1 parent 907e33e commit 9046411
Show file tree
Hide file tree
Showing 16 changed files with 1,331 additions and 625 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -13,6 +13,8 @@ fabric-ca-client/lib/msp/*
fabric-ca-client/lib/protos/*
fabric-ca-client/lib/hash.js
fabric-ca-client/lib/impl/*
fabric-ca-client/types/base.d.ts
fabric-ca-client/types/tsconfig.json
npm-shrinkwrap.json
package-lock.json
npm-debug.log
Expand All @@ -26,3 +28,5 @@ test/fixtures/src/github.com/example_cc/junk.go
*.heapsnapshot
.vscode
.idea
test/typescript/**/*.js
test/typescript/**/*.js.map
4 changes: 3 additions & 1 deletion build/tasks/ca.js
Expand Up @@ -26,7 +26,9 @@ const DEPS = [
'fabric-client/lib/msp/identity.js',
'fabric-client/lib/msp/msp.js',
'fabric-client/lib/protos/msp/identities.proto',
'fabric-client/lib/protos/msp/msp_config.proto'
'fabric-client/lib/protos/msp/msp_config.proto',
'fabric-client/types/tsconfig.json',
'fabric-client/types/base.d.ts'
];

gulp.task('ca', function() {
Expand Down
1 change: 1 addition & 0 deletions build/tasks/eslint.js
Expand Up @@ -11,6 +11,7 @@ gulp.task('lint', function () {
'**/*.js',
'fabric-client/**/*.js',
'fabric-ca-client/lib/*.js',
'!test/typescript/test.js',
'!node_modules/**',
'!fabric-client/node_modules/**',
'!fabric-ca-client/node_modules/**',
Expand Down
9 changes: 8 additions & 1 deletion build/tasks/test.js
Expand Up @@ -99,7 +99,14 @@ gulp.task('docker-ready', ['docker-clean'], shell.task([
'docker-compose -f test/fixtures/docker-compose.yaml up -d'
]));

gulp.task('test', ['clean-up', 'lint', 'pre-test', 'docker-ready', 'ca'], function() {
gulp.task('compile', shell.task([
'npm run compile',
], {
verbose: true, // so we can see the docker command output
ignoreErrors: false // once compile failed, throw error
}));

gulp.task('test', ['clean-up', 'lint', 'pre-test', 'compile', 'docker-ready', 'ca'], function() {
// use individual tests to control the sequence they get executed
// first run the ca-tests that tests all the member registration
// and enrollment scenarios (good and bad calls). Then the rest
Expand Down
154 changes: 0 additions & 154 deletions fabric-ca-client/index.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion fabric-ca-client/package.json
Expand Up @@ -10,7 +10,7 @@
"node": "^8.9.0",
"npm": "^5.5.1"
},
"types": "./index.d.ts",
"types": "./types/index.d.ts",
"dependencies": {
"bn.js": "^4.11.3",
"elliptic": "^6.2.3",
Expand Down

0 comments on commit 9046411

Please sign in to comment.