diff options
author | Fabio Berger <me@fabioberger.com> | 2018-04-12 08:26:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-12 08:26:42 +0800 |
commit | 749354b1c04f45a30086163ec221695705dcab42 (patch) | |
tree | 264a89829e2b49afc8c4e598c841205b7fbbee61 | |
parent | 5eb90697c824f1c98467cdb6cd71dbb94ff70805 (diff) | |
parent | 72aa3d3005c81c1d0deb66369ce543bda3cccdc1 (diff) | |
download | dexon-sol-tools-749354b1c04f45a30086163ec221695705dcab42.tar dexon-sol-tools-749354b1c04f45a30086163ec221695705dcab42.tar.gz dexon-sol-tools-749354b1c04f45a30086163ec221695705dcab42.tar.bz2 dexon-sol-tools-749354b1c04f45a30086163ec221695705dcab42.tar.lz dexon-sol-tools-749354b1c04f45a30086163ec221695705dcab42.tar.xz dexon-sol-tools-749354b1c04f45a30086163ec221695705dcab42.tar.zst dexon-sol-tools-749354b1c04f45a30086163ec221695705dcab42.zip |
Merge pull request #520 from 0xProject/fix/installation-tests
Fix the publishing/installation test issues
-rw-r--r-- | .circleci/config.yml | 6 | ||||
-rw-r--r-- | packages/deployer/package.json | 2 | ||||
-rw-r--r-- | packages/json-schemas/package.json | 1 | ||||
-rw-r--r-- | packages/monorepo-scripts/src/test_installation.ts | 6 | ||||
-rw-r--r-- | packages/monorepo-scripts/tsconfig.json | 2 | ||||
-rw-r--r-- | packages/sra-report/package.json | 8 | ||||
-rw-r--r-- | packages/tslint-config/tsconfig.json | 2 | ||||
-rw-r--r-- | packages/types/tsconfig.json | 2 | ||||
-rw-r--r-- | packages/typescript-typings/types/ethereumjs-util/index.d.ts | 1 |
9 files changed, 16 insertions, 14 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 8e5fd969d..615980e88 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -183,9 +183,9 @@ workflows: main: jobs: - build - # - test-installation: - # requires: - # - build + - test-installation: + requires: + - build - test-0xjs: requires: - build diff --git a/packages/deployer/package.json b/packages/deployer/package.json index 1050c095f..6afaa13b3 100644 --- a/packages/deployer/package.json +++ b/packages/deployer/package.json @@ -52,7 +52,6 @@ "@0xproject/tslint-config": "^0.4.15", "@types/require-from-string": "^1.2.0", "@types/semver": "^5.5.0", - "@types/yargs": "^11.0.0", "chai": "^4.0.1", "chai-as-promised": "^7.1.0", "copyfiles": "^1.2.0", @@ -73,6 +72,7 @@ "@0xproject/typescript-typings": "^0.1.0", "@0xproject/utils": "^0.5.1", "@0xproject/web3-wrapper": "^0.6.0", + "@types/yargs": "^11.0.0", "ethereumjs-util": "^5.1.1", "isomorphic-fetch": "^2.2.1", "lodash": "^4.17.4", diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index 3ddc831fa..342d4e36c 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -43,6 +43,7 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/json-schemas/README.md", "dependencies": { "@0xproject/typescript-typings": "^0.1.0", + "@types/node": "^8.0.53", "jsonschema": "^1.2.0", "lodash.values": "^4.3.0" }, diff --git a/packages/monorepo-scripts/src/test_installation.ts b/packages/monorepo-scripts/src/test_installation.ts index 195b64b2a..78e0f0929 100644 --- a/packages/monorepo-scripts/src/test_installation.ts +++ b/packages/monorepo-scripts/src/test_installation.ts @@ -31,7 +31,7 @@ import { utils } from './utils'; utils.log(`Installing ${packedPackageFileName}`); result = await execAsync(`yarn add ${packagePath}/${packedPackageFileName}`, { cwd: testDirectory }); const indexFilePath = path.join(testDirectory, 'index.ts'); - fs.writeFileSync(indexFilePath, `import * as Package from '${packageName}'`); + fs.writeFileSync(indexFilePath, `import * as Package from '${packageName}';\n`); const tsConfig = { compilerOptions: { typeRoots: ['node_modules/@0xproject/typescript-typings/types', 'node_modules/@types'], @@ -48,11 +48,13 @@ import { utils } from './utils'; const tsconfigFilePath = path.join(testDirectory, 'tsconfig.json'); fs.writeFileSync(tsconfigFilePath, JSON.stringify(tsConfig, null, 4)); utils.log(`Compiling ${packageName}`); - await execAsync('../node_modules/typescript/bin/tsc', { cwd: testDirectory }); + const tscBinaryPath = path.join(monorepoRootPath, './node_modules/typescript/bin/tsc'); + await execAsync(tscBinaryPath, { cwd: testDirectory }); utils.log(`Successfully compiled with ${packageName} as a dependency`); rimraf.sync(testDirectory); } })().catch(err => { + utils.log(err.stderr); utils.log(err.stdout); process.exit(1); }); diff --git a/packages/monorepo-scripts/tsconfig.json b/packages/monorepo-scripts/tsconfig.json index 5ec2db5e0..332d3a5e1 100644 --- a/packages/monorepo-scripts/tsconfig.json +++ b/packages/monorepo-scripts/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig", "compilerOptions": { - "typeRoots": ["node_modules/@types"], + "typeRoots": ["../../node_modules/@types", "node_modules/@types"], "outDir": "lib" }, "include": ["./src/**/*"] diff --git a/packages/sra-report/package.json b/packages/sra-report/package.json index 1d0163b82..578aea48f 100644 --- a/packages/sra-report/package.json +++ b/packages/sra-report/package.json @@ -2,13 +2,13 @@ "name": "@0xproject/sra-report", "version": "0.0.8", "description": "Generate reports for standard relayer API compliance", - "main": "lib/index.js", - "types": "lib/index.d.ts", + "main": "lib/src/index.js", + "types": "lib/src/index.d.ts", "scripts": { "build:watch": "tsc -w", "clean": "shx rm -rf lib scripts", "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", - "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", + "lint": "tslint --project .", "test": "run-s clean build copy_test_environments copy_test_fixtures run_mocha", "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", "copy_test_environments": "copyfiles -u 2 './test/environments/**/*.json' ./lib/test/environments", @@ -16,7 +16,7 @@ "manual:postpublish": "yarn build; node ./scripts/postpublish.js" }, "bin": { - "sra-report": "lib/index.js" + "sra-report": "lib/src/index.js" }, "repository": { "type": "git", diff --git a/packages/tslint-config/tsconfig.json b/packages/tslint-config/tsconfig.json index fd9b23316..3f349e100 100644 --- a/packages/tslint-config/tsconfig.json +++ b/packages/tslint-config/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig", "compilerOptions": { - "typeRoots": ["node_modules/@types"], + "typeRoots": ["../../node_modules/@types", "node_modules/@types"], "outDir": "lib" }, "include": ["./rules/**/*", "./monorepo_scripts/**/*"] diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index 9f1937b22..ce916a635 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig", "compilerOptions": { - "typeRoots": ["node_modules/@types"], + "typeRoots": ["../../node_modules/@types", "node_modules/@types"], "outDir": "lib" }, "include": ["src/**/*"] diff --git a/packages/typescript-typings/types/ethereumjs-util/index.d.ts b/packages/typescript-typings/types/ethereumjs-util/index.d.ts index fae55c418..b1c521e18 100644 --- a/packages/typescript-typings/types/ethereumjs-util/index.d.ts +++ b/packages/typescript-typings/types/ethereumjs-util/index.d.ts @@ -1,5 +1,4 @@ declare module 'ethereumjs-util' { - import { Buffer } from 'buffer'; import BN = require('bn.js'); interface Signature { |