Kaynağa Gözat

Update dev dependencies

Set idea language to ES6
Run tests against dist
master
Nicolas Dextraze 3 yıl önce
ebeveyn
işleme
bbf25ee8b5
  1. 2
      .idea/misc.xml
  2. 13391
      package-lock.json
  3. 11
      package.json
  4. 4
      test/appendToStream_test.js
  5. 2
      test/cluster/dns_test.js
  6. 2
      test/cluster/gossipSeeds_test.js
  7. 2
      test/common/base_test.js
  8. 4
      test/connection_test.js
  9. 4
      test/deleteStream_test.js
  10. 2
      test/metadata_test.js
  11. 4
      test/persistentSubscription_test.js
  12. 4
      test/projections_test.js
  13. 4
      test/readAllEventsBackward_test.js
  14. 4
      test/readAllEventsForward_test.js
  15. 4
      test/readEvent_test.js
  16. 4
      test/readStreamEventsBackward_test.js
  17. 4
      test/readStreamEventsForward_test.js
  18. 4
      test/subscribeToAllFrom_test.js
  19. 4
      test/subscribeToAll_test.js
  20. 4
      test/subscribeToStreamFrom_test.js
  21. 4
      test/subscribeToStream_test.js
  22. 2
      test/transactions_test.js
  23. 6
      webpack.config.js

2
.idea/misc.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES5" />
<option name="languageLevel" value="ES6" />
</component>
</project>

13391
package-lock.json üretilen

Dosya farkı çok büyük olduğundan ihmal edildi Load Diff

11
package.json

@ -51,10 +51,11 @@
"uuid": "^3.0.1"
},
"devDependencies": {
"@types/long": "^3.0.31",
"@types/node": "^6.0.47",
"jsdoc": "^3.5.5",
"nodeunit": "^0.11.1",
"webpack": "^3.3.0"
"@types/long": "^3.0.32",
"@types/node": "^12.12.5",
"jsdoc": "^3.6.3",
"nodeunit": "^0.11.3",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10"
}
}

4
test/appendToStream_test.js

@ -1,5 +1,5 @@
var uuid = require('uuid');
var client = require('../src/client');
var client = require('../lib/dist');
var Long = require('long');
var ANY_VERSION = Long.fromNumber(client.expectedVersion.any);
@ -63,7 +63,7 @@ module.exports = {
test.expect(2);
const largeData = Buffer.alloc(3 * 1024 *1024, " ");
const event = client.createJsonEventData(uuid.v4(), {a: largeData.toString()}, null, 'largePayloadEvent');
this.conn.appendToStream(this.testStreamName, ANY_VERSION, event)
.then(function(result) {
test.areEqual("result.nextExpectedVersion", result.nextExpectedVersion, Long.fromNumber(0));

2
test/cluster/dns_test.js

@ -1,4 +1,4 @@
var client = require('../../src/client');
var client = require('../../lib/dist');
var uuid = require('uuid');
var settings = {

2
test/cluster/gossipSeeds_test.js

@ -1,4 +1,4 @@
var client = require('../../src/client');
var client = require('../../lib/dist');
var uuid = require('uuid');
var settings = {

2
test/common/base_test.js

@ -1,6 +1,6 @@
var util = require('util');
var uuid = require('uuid');
var client = require('../../src/client');
var client = require('../../lib/dist');
var FileLogger = require('../../src/common/log/fileLogger');
var NoopLogger = require('../../src/common/log/noopLogger');

4
test/connection_test.js

@ -1,4 +1,4 @@
var client = require('../src/client.js');
var client = require('../lib/dist');
var GossipSeed = require('../src/gossipSeed');
var testBase = require('./common/base_test');
@ -97,4 +97,4 @@ if (withSsl) {
}
}
testBase.init(module.exports, false);
testBase.init(module.exports, false);

4
test/deleteStream_test.js

@ -1,5 +1,5 @@
var uuid = require('uuid');
var client = require('../src/client');
var client = require('../lib/dist');
var Long = require('long');
module.exports = {
@ -102,4 +102,4 @@ module.exports = {
}
};
require('./common/base_test').init(module.exports);
require('./common/base_test').init(module.exports);

2
test/metadata_test.js

@ -1,4 +1,4 @@
var client = require('../src/client');
var client = require('../lib/dist');
const Long = require('long');
const EMPTY_VERSION = Long.fromNumber(client.expectedVersion.emptyStream);

4
test/persistentSubscription_test.js

@ -1,6 +1,6 @@
var util = require('util');
var uuid = require('uuid');
var client = require('../src/client');
var client = require('../lib/dist');
const adminCredentials = new client.UserCredentials("admin", "changeit");
function createRandomEvent() {
@ -78,4 +78,4 @@ module.exports = {
}
};
require('./common/base_test').init(module.exports);
require('./common/base_test').init(module.exports);

4
test/projections_test.js

@ -1,4 +1,4 @@
const client = require('../src/client');
const client = require('../lib/dist');
const userCredentials = new client.UserCredentials('admin', 'changeit');
const log = new client.NoopLogger();
@ -44,4 +44,4 @@ module.exports = {
.catch(test.done);
}
//TODO: other tests
};
};

4
test/readAllEventsBackward_test.js

@ -1,6 +1,6 @@
var util = require('util');
var uuid = require('uuid');
var client = require('../src/client');
var client = require('../lib/dist');
const numberOfStreams = 20;
const maxBatch = 10;
@ -72,4 +72,4 @@ module.exports = {
}
};
require('./common/base_test').init(module.exports);
require('./common/base_test').init(module.exports);

4
test/readAllEventsForward_test.js

@ -1,6 +1,6 @@
var util = require('util');
var uuid = require('uuid');
var client = require('../src/client');
var client = require('../lib/dist');
const numberOfStreams = 20;
const maxBatch = 10;
@ -73,4 +73,4 @@ module.exports = {
}
};
require('./common/base_test').init(module.exports);
require('./common/base_test').init(module.exports);

4
test/readEvent_test.js

@ -1,5 +1,5 @@
var uuid = require('uuid');
var client = require('../src/client');
var client = require('../lib/dist');
var Long = require('long');
var NOSTREAM_VERSION = Long.fromNumber(client.expectedVersion.noStream);
@ -142,4 +142,4 @@ module.exports = {
},
};
require('./common/base_test').init(module.exports);
require('./common/base_test').init(module.exports);

4
test/readStreamEventsBackward_test.js

@ -1,5 +1,5 @@
var uuid = require('uuid');
var client = require('../src/client');
var client = require('../lib/dist');
var Long = require('long');
const streamSize = 100;
@ -109,4 +109,4 @@ module.exports = {
}
};
require('./common/base_test').init(module.exports);
require('./common/base_test').init(module.exports);

4
test/readStreamEventsForward_test.js

@ -1,5 +1,5 @@
var uuid = require('uuid');
var client = require('../src/client');
var client = require('../lib/dist');
var Long = require('long');
const streamSize = 100;
@ -108,4 +108,4 @@ module.exports = {
}
};
require('./common/base_test').init(module.exports);
require('./common/base_test').init(module.exports);

4
test/subscribeToAllFrom_test.js

@ -1,6 +1,6 @@
var util = require('util');
var uuid = require('uuid');
var client = require('../src/client');
var client = require('../lib/dist');
const allCredentials = new client.UserCredentials("admin", "changeit");
function createRandomEvent() {
@ -180,4 +180,4 @@ module.exports = {
}
};
require('./common/base_test').init(module.exports);
require('./common/base_test').init(module.exports);

4
test/subscribeToAll_test.js

@ -1,5 +1,5 @@
const uuid = require('uuid');
const client = require('../src/client');
const client = require('../lib/dist');
const allCredentials = new client.UserCredentials("admin", "changeit");
function delay(ms) {
@ -69,4 +69,4 @@ module.exports = {
}
};
require('./common/base_test').init(module.exports);
require('./common/base_test').init(module.exports);

4
test/subscribeToStreamFrom_test.js

@ -1,5 +1,5 @@
var uuid = require('uuid');
var client = require('../src/client');
var client = require('../lib/dist');
var Long = require('long');
function createRandomEvent() {
@ -134,4 +134,4 @@ module.exports = {
}
};
require('./common/base_test').init(module.exports);
require('./common/base_test').init(module.exports);

4
test/subscribeToStream_test.js

@ -1,5 +1,5 @@
const uuid = require('uuid');
const client = require('../src/client');
const client = require('../lib/dist');
const Long = require('long');
function delay(ms) {
@ -70,4 +70,4 @@ module.exports = {
}
};
require('./common/base_test').init(module.exports);
require('./common/base_test').init(module.exports);

2
test/transactions_test.js

@ -1,6 +1,6 @@
var uuid = require('uuid');
var Long = require('long');
var client = require('../src/client');
var client = require('../lib/dist');
var ANY_VERSION = Long.fromNumber(client.expectedVersion.any);
var NOSTREAM_VERSION = Long.fromNumber(client.expectedVersion.noStream);

6
webpack.config.js

@ -1,8 +1,10 @@
module.exports = {
mode: "none",
entry: "./src/client.js",
target: "node",
output: {
filename: "./lib/dist.js",
path: process.env.PWD + "/lib",
filename: "dist.js",
libraryTarget: "commonjs2"
},
externals: [
@ -11,4 +13,4 @@ module.exports = {
"../messages/clientMessage": "../src/messages/clientMessage"
}
]
};
};

Yükleniyor…
İptal
Kaydet