From 9d11028fce50748d69db5c3b867b1ea063bf2b52 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 23 May 2018 13:56:52 -0700 Subject: Bump all dependencies on json-schemas down a patch version so that they don't auto-magically get upgraded to the next version during the next publish --- packages/assert/package.json | 2 +- packages/connect/package.json | 2 +- packages/contract-wrappers/package.json | 2 +- packages/order-utils/package.json | 2 +- packages/order-watcher/package.json | 2 +- packages/sol-compiler/package.json | 2 +- packages/sra-report/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'packages') diff --git a/packages/assert/package.json b/packages/assert/package.json index 88f4dac99..49968b0e4 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -47,7 +47,7 @@ "typescript": "2.7.1" }, "dependencies": { - "@0xproject/json-schemas": "^0.7.24", + "@0xproject/json-schemas": "^0.7.23", "@0xproject/typescript-typings": "^0.3.2", "@0xproject/utils": "^0.6.2", "lodash": "^4.17.4", diff --git a/packages/connect/package.json b/packages/connect/package.json index ed54b47ac..cdd274e62 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -51,7 +51,7 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md", "dependencies": { "@0xproject/assert": "^0.2.10", - "@0xproject/json-schemas": "^0.7.24", + "@0xproject/json-schemas": "^0.7.23", "@0xproject/types": "^0.7.0", "@0xproject/typescript-typings": "^0.3.2", "@0xproject/utils": "^0.6.2", diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 10719c831..1802a77c1 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -79,7 +79,7 @@ "@0xproject/assert": "^0.2.10", "@0xproject/base-contract": "^0.3.2", "@0xproject/fill-scenarios": "^0.0.2", - "@0xproject/json-schemas": "^0.7.24", + "@0xproject/json-schemas": "^0.7.23", "@0xproject/order-utils": "^0.0.5", "@0xproject/types": "^0.7.0", "@0xproject/typescript-typings": "^0.3.2", diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index 117b57f45..c0be3a26f 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -63,7 +63,7 @@ }, "dependencies": { "@0xproject/assert": "^0.2.10", - "@0xproject/json-schemas": "^0.7.24", + "@0xproject/json-schemas": "^0.7.23", "@0xproject/types": "^0.7.0", "@0xproject/typescript-typings": "^0.3.2", "@0xproject/utils": "^0.6.2", diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index c84858bfd..c869efb7f 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -80,7 +80,7 @@ "@0xproject/base-contract": "^0.3.2", "@0xproject/contract-wrappers": "^0.0.2", "@0xproject/fill-scenarios": "^0.0.2", - "@0xproject/json-schemas": "^0.7.24", + "@0xproject/json-schemas": "^0.7.23", "@0xproject/order-utils": "^0.0.5", "@0xproject/types": "^0.7.0", "@0xproject/typescript-typings": "^0.3.2", diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index c94e59eb4..0b296ddf9 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -72,7 +72,7 @@ "zeppelin-solidity": "1.8.0" }, "dependencies": { - "@0xproject/json-schemas": "^0.7.24", + "@0xproject/json-schemas": "^0.7.23", "@0xproject/sol-resolver": "^0.0.5", "@0xproject/types": "^0.7.0", "@0xproject/typescript-typings": "^0.3.2", diff --git a/packages/sra-report/package.json b/packages/sra-report/package.json index 810acab1c..8b5577e04 100644 --- a/packages/sra-report/package.json +++ b/packages/sra-report/package.json @@ -35,7 +35,7 @@ "@0xproject/types": "^0.7.0", "@0xproject/order-utils": "^0.0.5", "@0xproject/connect": "^0.6.13", - "@0xproject/json-schemas": "^0.7.24", + "@0xproject/json-schemas": "^0.7.23", "@0xproject/typescript-typings": "^0.3.2", "@0xproject/utils": "^0.6.2", "chalk": "^2.3.0", -- cgit v1.2.3 From 9c850d152cd024c8852200c237790e8bee82b3a9 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 23 May 2018 16:52:41 -0700 Subject: Updated Order, SignedOrder schemas, removed ECSignature schema types and added Hex basic type --- .../json-schemas/schemas/basic_type_schemas.ts | 6 ++ .../json-schemas/schemas/ec_signature_schema.ts | 20 ------ packages/json-schemas/schemas/order_schemas.ts | 36 +++++------ packages/json-schemas/src/schemas.ts | 6 +- packages/json-schemas/test/schema_test.ts | 74 ++++++---------------- 5 files changed, 44 insertions(+), 98 deletions(-) delete mode 100644 packages/json-schemas/schemas/ec_signature_schema.ts (limited to 'packages') diff --git a/packages/json-schemas/schemas/basic_type_schemas.ts b/packages/json-schemas/schemas/basic_type_schemas.ts index 9d81ff333..8430b6f4a 100644 --- a/packages/json-schemas/schemas/basic_type_schemas.ts +++ b/packages/json-schemas/schemas/basic_type_schemas.ts @@ -4,6 +4,12 @@ export const addressSchema = { pattern: '^0x[0-9a-f]{40}$', }; +export const hexSchema = { + id: '/Hex', + type: 'string', + pattern: '^0x[0-9a-f]', +}; + export const numberSchema = { id: '/Number', type: 'string', diff --git a/packages/json-schemas/schemas/ec_signature_schema.ts b/packages/json-schemas/schemas/ec_signature_schema.ts deleted file mode 100644 index 71b840dd8..000000000 --- a/packages/json-schemas/schemas/ec_signature_schema.ts +++ /dev/null @@ -1,20 +0,0 @@ -export const ecSignatureParameterSchema = { - id: '/ECSignatureParameter', - type: 'string', - pattern: '^0[xX][0-9A-Fa-f]{64}$', -}; - -export const ecSignatureSchema = { - id: '/ECSignature', - properties: { - v: { - type: 'number', - minimum: 27, - maximum: 28, - }, - r: { $ref: '/ECSignatureParameter' }, - s: { $ref: '/ECSignatureParameter' }, - }, - required: ['v', 'r', 's'], - type: 'object', -}; diff --git a/packages/json-schemas/schemas/order_schemas.ts b/packages/json-schemas/schemas/order_schemas.ts index 6f17224ad..183118c23 100644 --- a/packages/json-schemas/schemas/order_schemas.ts +++ b/packages/json-schemas/schemas/order_schemas.ts @@ -1,30 +1,30 @@ export const orderSchema = { id: '/Order', properties: { - maker: { $ref: '/Address' }, - taker: { $ref: '/Address' }, + makerAddress: { $ref: '/Address' }, + takerAddress: { $ref: '/Address' }, makerFee: { $ref: '/Number' }, takerFee: { $ref: '/Number' }, - makerTokenAmount: { $ref: '/Number' }, - takerTokenAmount: { $ref: '/Number' }, - makerTokenAddress: { $ref: '/Address' }, - takerTokenAddress: { $ref: '/Address' }, + makerAssetAmount: { $ref: '/Number' }, + takerAssetAmount: { $ref: '/Number' }, + makerAssetData: { $ref: '/Hex' }, + takerAssetData: { $ref: '/Hex' }, salt: { $ref: '/Number' }, - feeRecipient: { $ref: '/Address' }, - expirationUnixTimestampSec: { $ref: '/Number' }, - exchangeContractAddress: { $ref: '/Address' }, + feeRecipientAddress: { $ref: '/Address' }, + expirationTimeSeconds: { $ref: '/Number' }, }, required: [ - 'maker', - 'taker', + 'makerAddress', + 'takerAddress', 'makerFee', 'takerFee', - 'makerTokenAmount', - 'takerTokenAmount', + 'makerAssetAmount', + 'takerAssetAmount', + 'makerAssetData', + 'takerAssetData', 'salt', - 'feeRecipient', - 'expirationUnixTimestampSec', - 'exchangeContractAddress', + 'feeRecipientAddress', + 'expirationTimeSeconds', ], type: 'object', }; @@ -35,9 +35,9 @@ export const signedOrderSchema = { { $ref: '/Order' }, { properties: { - ecSignature: { $ref: '/ECSignature' }, + signature: { $ref: '/Hex' }, }, - required: ['ecSignature'], + required: ['signature'], }, ], }; diff --git a/packages/json-schemas/src/schemas.ts b/packages/json-schemas/src/schemas.ts index 5cb07acfe..26d6e6cf1 100644 --- a/packages/json-schemas/src/schemas.ts +++ b/packages/json-schemas/src/schemas.ts @@ -1,6 +1,5 @@ -import { addressSchema, numberSchema } from '../schemas/basic_type_schemas'; +import { addressSchema, hexSchema, numberSchema } from '../schemas/basic_type_schemas'; import { blockParamSchema, blockRangeSchema } from '../schemas/block_range_schema'; -import { ecSignatureParameterSchema, ecSignatureSchema } from '../schemas/ec_signature_schema'; import { indexFilterValuesSchema } from '../schemas/index_filter_values_schema'; import { orderCancellationRequestsSchema } from '../schemas/order_cancel_schema'; import { orderFillOrKillRequestsSchema } from '../schemas/order_fill_or_kill_requests_schema'; @@ -31,8 +30,7 @@ import { jsNumber, txDataSchema } from '../schemas/tx_data_schema'; export const schemas = { numberSchema, addressSchema, - ecSignatureSchema, - ecSignatureParameterSchema, + hexSchema, indexFilterValuesSchema, orderCancellationRequestsSchema, orderFillOrKillRequestsSchema, diff --git a/packages/json-schemas/test/schema_test.ts b/packages/json-schemas/test/schema_test.ts index b9574a0c9..d8479ef4f 100644 --- a/packages/json-schemas/test/schema_test.ts +++ b/packages/json-schemas/test/schema_test.ts @@ -14,8 +14,6 @@ const NULL_ADDRESS = '0x0000000000000000000000000000000000000000'; const { numberSchema, addressSchema, - ecSignatureSchema, - ecSignatureParameterSchema, orderCancellationRequestsSchema, orderFillOrKillRequestsSchema, orderFillRequestsSchema, @@ -85,47 +83,15 @@ describe('Schema', () => { validateAgainstSchema(testCases, addressSchema, shouldFail); }); }); - describe('#ecSignatureParameterSchema', () => { - it('should validate valid parameters', () => { - const testCases = [ - '0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33', - '0X40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254', - ]; - validateAgainstSchema(testCases, ecSignatureParameterSchema); - }); - it('should fail for invalid parameters', () => { - const testCases = [ - '0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc3', // shorter - '0xzzzz9190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254', // invalid characters - '40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254', // no 0x - ]; - const shouldFail = true; - validateAgainstSchema(testCases, ecSignatureParameterSchema, shouldFail); - }); - }); - describe('#ecSignatureSchema', () => { - it('should validate valid signature', () => { - const signature = { - v: 27, - r: '0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33', - s: '0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254', - }; - const testCases = [ - signature, - { - ...signature, - v: 28, - }, - ]; - validateAgainstSchema(testCases, ecSignatureSchema); + describe('#hexSchema', () => { + it('should validate valid hex string', () => { + const testCases = ['0x8b0292b11a196601ed2ce54b665cafeca0347d42', NULL_ADDRESS]; + validateAgainstSchema(testCases, addressSchema); }); - it('should fail for invalid signature', () => { - const v = 27; - const r = '0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33'; - const s = '0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254'; - const testCases = [{}, { v }, { r, s, v: 31 }]; + it('should fail for invalid hex string', () => { + const testCases = ['0x', '0', '0x00', '0xzzzzzzB11a196601eD2ce54B665CaFEca0347D42']; const shouldFail = true; - validateAgainstSchema(testCases, ecSignatureSchema, shouldFail); + validateAgainstSchema(testCases, addressSchema, shouldFail); }); }); describe('#orderHashSchema', () => { @@ -202,18 +168,17 @@ describe('Schema', () => { }); describe('order including schemas', () => { const order = { - maker: NULL_ADDRESS, - taker: NULL_ADDRESS, + makerAddress: NULL_ADDRESS, + takerAddress: NULL_ADDRESS, makerFee: '1', takerFee: '2', - makerTokenAmount: '1', - takerTokenAmount: '2', - makerTokenAddress: NULL_ADDRESS, - takerTokenAddress: NULL_ADDRESS, + makerAssetAmount: '1', + takerAssetAmount: '2', + makerAssetData: NULL_ADDRESS, + takerAssetData: NULL_ADDRESS, salt: '67006738228878699843088602623665307406148487219438534730168799356281242528500', - feeRecipient: NULL_ADDRESS, - exchangeContractAddress: NULL_ADDRESS, - expirationUnixTimestampSec: '42', + feeRecipientAddress: NULL_ADDRESS, + expirationTimeSeconds: '42', }; describe('#orderSchema', () => { it('should validate valid order', () => { @@ -239,11 +204,8 @@ describe('Schema', () => { describe('signed order including schemas', () => { const signedOrder = { ...order, - ecSignature: { - v: 27, - r: '0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33', - s: '0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254', - }, + signature: + '0x031b61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254', }; describe('#signedOrdersSchema', () => { it('should validate valid signed orders', () => { @@ -265,7 +227,7 @@ describe('Schema', () => { const testCases = [ { ...signedOrder, - ecSignature: undefined, + signature: undefined, }, ]; const shouldFail = true; -- cgit v1.2.3 From f64ea361d45bd35d39fbf191cddf32b9f63c9939 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 23 May 2018 17:00:32 -0700 Subject: Add CHANGELOG entry --- packages/json-schemas/CHANGELOG.json | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'packages') diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json index ea0df7eb7..3399a452a 100644 --- a/packages/json-schemas/CHANGELOG.json +++ b/packages/json-schemas/CHANGELOG.json @@ -1,4 +1,14 @@ [ + { + "version": "0.8.0", + "changes": [ + { + "note": + "Update Order & SignedOrder schemas, remove ECSignature schema and add Hex schema as part of V2 upgrades", + "pr": 615 + } + ] + }, { "timestamp": 1527008794, "version": "0.7.24", -- cgit v1.2.3 From 2c70162beed505bfccb4acf154d3a693f9a5ce7f Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 23 May 2018 17:28:03 -0700 Subject: Remove the caret so it actually installs this version --- packages/assert/package.json | 2 +- packages/connect/package.json | 2 +- packages/contract-wrappers/package.json | 2 +- packages/order-utils/package.json | 2 +- packages/order-watcher/package.json | 2 +- packages/sol-compiler/package.json | 2 +- packages/sra-report/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'packages') diff --git a/packages/assert/package.json b/packages/assert/package.json index 49968b0e4..ea6352eb0 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -47,7 +47,7 @@ "typescript": "2.7.1" }, "dependencies": { - "@0xproject/json-schemas": "^0.7.23", + "@0xproject/json-schemas": "0.7.23", "@0xproject/typescript-typings": "^0.3.2", "@0xproject/utils": "^0.6.2", "lodash": "^4.17.4", diff --git a/packages/connect/package.json b/packages/connect/package.json index cdd274e62..9bf04c636 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -51,7 +51,7 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md", "dependencies": { "@0xproject/assert": "^0.2.10", - "@0xproject/json-schemas": "^0.7.23", + "@0xproject/json-schemas": "0.7.23", "@0xproject/types": "^0.7.0", "@0xproject/typescript-typings": "^0.3.2", "@0xproject/utils": "^0.6.2", diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 1802a77c1..062c1413d 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -79,7 +79,7 @@ "@0xproject/assert": "^0.2.10", "@0xproject/base-contract": "^0.3.2", "@0xproject/fill-scenarios": "^0.0.2", - "@0xproject/json-schemas": "^0.7.23", + "@0xproject/json-schemas": "0.7.23", "@0xproject/order-utils": "^0.0.5", "@0xproject/types": "^0.7.0", "@0xproject/typescript-typings": "^0.3.2", diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index c0be3a26f..114c1fd35 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -63,7 +63,7 @@ }, "dependencies": { "@0xproject/assert": "^0.2.10", - "@0xproject/json-schemas": "^0.7.23", + "@0xproject/json-schemas": "0.7.23", "@0xproject/types": "^0.7.0", "@0xproject/typescript-typings": "^0.3.2", "@0xproject/utils": "^0.6.2", diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index c869efb7f..b1a9605d9 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -80,7 +80,7 @@ "@0xproject/base-contract": "^0.3.2", "@0xproject/contract-wrappers": "^0.0.2", "@0xproject/fill-scenarios": "^0.0.2", - "@0xproject/json-schemas": "^0.7.23", + "@0xproject/json-schemas": "0.7.23", "@0xproject/order-utils": "^0.0.5", "@0xproject/types": "^0.7.0", "@0xproject/typescript-typings": "^0.3.2", diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index 0b296ddf9..41dad6b03 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -72,7 +72,7 @@ "zeppelin-solidity": "1.8.0" }, "dependencies": { - "@0xproject/json-schemas": "^0.7.23", + "@0xproject/json-schemas": "0.7.23", "@0xproject/sol-resolver": "^0.0.5", "@0xproject/types": "^0.7.0", "@0xproject/typescript-typings": "^0.3.2", diff --git a/packages/sra-report/package.json b/packages/sra-report/package.json index 8b5577e04..ac2ab8bee 100644 --- a/packages/sra-report/package.json +++ b/packages/sra-report/package.json @@ -35,7 +35,7 @@ "@0xproject/types": "^0.7.0", "@0xproject/order-utils": "^0.0.5", "@0xproject/connect": "^0.6.13", - "@0xproject/json-schemas": "^0.7.23", + "@0xproject/json-schemas": "0.7.23", "@0xproject/typescript-typings": "^0.3.2", "@0xproject/utils": "^0.6.2", "chalk": "^2.3.0", -- cgit v1.2.3 From 59890f2c832a99372a3cdc423a23a4769f214fdc Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 23 May 2018 17:28:17 -0700 Subject: Fix Hex regex and tests --- packages/json-schemas/schemas/basic_type_schemas.ts | 2 +- packages/json-schemas/test/schema_test.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/json-schemas/schemas/basic_type_schemas.ts b/packages/json-schemas/schemas/basic_type_schemas.ts index 8430b6f4a..2cf32b384 100644 --- a/packages/json-schemas/schemas/basic_type_schemas.ts +++ b/packages/json-schemas/schemas/basic_type_schemas.ts @@ -7,7 +7,7 @@ export const addressSchema = { export const hexSchema = { id: '/Hex', type: 'string', - pattern: '^0x[0-9a-f]', + pattern: '^0x([0-9a-f][0-9a-f])*$', }; export const numberSchema = { diff --git a/packages/json-schemas/test/schema_test.ts b/packages/json-schemas/test/schema_test.ts index d8479ef4f..a7d510122 100644 --- a/packages/json-schemas/test/schema_test.ts +++ b/packages/json-schemas/test/schema_test.ts @@ -14,6 +14,7 @@ const NULL_ADDRESS = '0x0000000000000000000000000000000000000000'; const { numberSchema, addressSchema, + hexSchema, orderCancellationRequestsSchema, orderFillOrKillRequestsSchema, orderFillRequestsSchema, @@ -86,12 +87,12 @@ describe('Schema', () => { describe('#hexSchema', () => { it('should validate valid hex string', () => { const testCases = ['0x8b0292b11a196601ed2ce54b665cafeca0347d42', NULL_ADDRESS]; - validateAgainstSchema(testCases, addressSchema); + validateAgainstSchema(testCases, hexSchema); }); it('should fail for invalid hex string', () => { const testCases = ['0x', '0', '0x00', '0xzzzzzzB11a196601eD2ce54B665CaFEca0347D42']; const shouldFail = true; - validateAgainstSchema(testCases, addressSchema, shouldFail); + validateAgainstSchema(testCases, hexSchema, shouldFail); }); }); describe('#orderHashSchema', () => { -- cgit v1.2.3 From 3ec05bb5d894d6c1f430e8fdeec2821f08328970 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 23 May 2018 17:36:34 -0700 Subject: Force hex to have at least two hex values after the prefix, but it could be two zeros --- packages/json-schemas/schemas/basic_type_schemas.ts | 2 +- packages/json-schemas/test/schema_test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/json-schemas/schemas/basic_type_schemas.ts b/packages/json-schemas/schemas/basic_type_schemas.ts index 2cf32b384..7565df9e0 100644 --- a/packages/json-schemas/schemas/basic_type_schemas.ts +++ b/packages/json-schemas/schemas/basic_type_schemas.ts @@ -7,7 +7,7 @@ export const addressSchema = { export const hexSchema = { id: '/Hex', type: 'string', - pattern: '^0x([0-9a-f][0-9a-f])*$', + pattern: '^0x([0-9a-f][0-9a-f])+$', }; export const numberSchema = { diff --git a/packages/json-schemas/test/schema_test.ts b/packages/json-schemas/test/schema_test.ts index a7d510122..379f92442 100644 --- a/packages/json-schemas/test/schema_test.ts +++ b/packages/json-schemas/test/schema_test.ts @@ -90,7 +90,7 @@ describe('Schema', () => { validateAgainstSchema(testCases, hexSchema); }); it('should fail for invalid hex string', () => { - const testCases = ['0x', '0', '0x00', '0xzzzzzzB11a196601eD2ce54B665CaFEca0347D42']; + const testCases = ['0x', '0', '0xzzzzzzB11a196601eD2ce54B665CaFEca0347D42']; const shouldFail = true; validateAgainstSchema(testCases, hexSchema, shouldFail); }); -- cgit v1.2.3 From 5c88f43e15f4cf087b0c3fee6344b1a8724874b1 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 23 May 2018 21:26:17 -0700 Subject: Revert to an earlier version that works --- packages/assert/package.json | 2 +- packages/connect/package.json | 2 +- packages/contract-wrappers/package.json | 2 +- packages/order-utils/package.json | 2 +- packages/order-watcher/package.json | 2 +- packages/sol-compiler/package.json | 2 +- packages/sra-report/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'packages') diff --git a/packages/assert/package.json b/packages/assert/package.json index ea6352eb0..e26c88fd7 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -47,7 +47,7 @@ "typescript": "2.7.1" }, "dependencies": { - "@0xproject/json-schemas": "0.7.23", + "@0xproject/json-schemas": "0.7.22", "@0xproject/typescript-typings": "^0.3.2", "@0xproject/utils": "^0.6.2", "lodash": "^4.17.4", diff --git a/packages/connect/package.json b/packages/connect/package.json index 9bf04c636..d1e392606 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -51,7 +51,7 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md", "dependencies": { "@0xproject/assert": "^0.2.10", - "@0xproject/json-schemas": "0.7.23", + "@0xproject/json-schemas": "0.7.22", "@0xproject/types": "^0.7.0", "@0xproject/typescript-typings": "^0.3.2", "@0xproject/utils": "^0.6.2", diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 062c1413d..6183bb701 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -79,7 +79,7 @@ "@0xproject/assert": "^0.2.10", "@0xproject/base-contract": "^0.3.2", "@0xproject/fill-scenarios": "^0.0.2", - "@0xproject/json-schemas": "0.7.23", + "@0xproject/json-schemas": "0.7.22", "@0xproject/order-utils": "^0.0.5", "@0xproject/types": "^0.7.0", "@0xproject/typescript-typings": "^0.3.2", diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index 114c1fd35..19e3d5668 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -63,7 +63,7 @@ }, "dependencies": { "@0xproject/assert": "^0.2.10", - "@0xproject/json-schemas": "0.7.23", + "@0xproject/json-schemas": "0.7.22", "@0xproject/types": "^0.7.0", "@0xproject/typescript-typings": "^0.3.2", "@0xproject/utils": "^0.6.2", diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index b1a9605d9..ee9d66cd3 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -80,7 +80,7 @@ "@0xproject/base-contract": "^0.3.2", "@0xproject/contract-wrappers": "^0.0.2", "@0xproject/fill-scenarios": "^0.0.2", - "@0xproject/json-schemas": "0.7.23", + "@0xproject/json-schemas": "0.7.22", "@0xproject/order-utils": "^0.0.5", "@0xproject/types": "^0.7.0", "@0xproject/typescript-typings": "^0.3.2", diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index 41dad6b03..7e55d718d 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -72,7 +72,7 @@ "zeppelin-solidity": "1.8.0" }, "dependencies": { - "@0xproject/json-schemas": "0.7.23", + "@0xproject/json-schemas": "0.7.22", "@0xproject/sol-resolver": "^0.0.5", "@0xproject/types": "^0.7.0", "@0xproject/typescript-typings": "^0.3.2", diff --git a/packages/sra-report/package.json b/packages/sra-report/package.json index ac2ab8bee..7e58a80a2 100644 --- a/packages/sra-report/package.json +++ b/packages/sra-report/package.json @@ -35,7 +35,7 @@ "@0xproject/types": "^0.7.0", "@0xproject/order-utils": "^0.0.5", "@0xproject/connect": "^0.6.13", - "@0xproject/json-schemas": "0.7.23", + "@0xproject/json-schemas": "0.7.22", "@0xproject/typescript-typings": "^0.3.2", "@0xproject/utils": "^0.6.2", "chalk": "^2.3.0", -- cgit v1.2.3 From a88e8ffe79c2401e41460966a552f253d44779a7 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 23 May 2018 21:27:08 -0700 Subject: Have source-map-loader ignore node_modules packages --- packages/website/webpack.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/website/webpack.config.js b/packages/website/webpack.config.js index f9abeb27c..b5e9cf6dd 100644 --- a/packages/website/webpack.config.js +++ b/packages/website/webpack.config.js @@ -1,6 +1,6 @@ const path = require('path'); const webpack = require('webpack'); -const UglifyJsPlugin = require('uglifyjs-webpack-plugin') +const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); module.exports = { entry: ['./ts/index.tsx'], @@ -25,6 +25,11 @@ module.exports = { { test: /\.js$/, loader: 'source-map-loader', + exclude: [ + // instead of /\/node_modules\// + path.join(process.cwd(), 'node_modules'), + path.join(process.cwd(), '../..', 'node_modules'), + ], }, { test: /\.tsx?$/, -- cgit v1.2.3