@fails-components/webtransport-transport-http3-quiche 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CMakeLists.txt CHANGED
@@ -611,6 +611,8 @@ third_party/quiche/quiche/quic/core/quic_alarm_factory.h
611
611
  third_party/quiche/quiche/quic/core/quic_arena_scoped_ptr.h
612
612
  third_party/quiche/quiche/quic/core/quic_bandwidth.cc
613
613
  third_party/quiche/quiche/quic/core/quic_bandwidth.h
614
+ third_party/quiche/quiche/quic/core/quic_blocked_writer_list.cc
615
+ third_party/quiche/quiche/quic/core/quic_blocked_writer_list.h
614
616
  third_party/quiche/quiche/quic/core/quic_blocked_writer_interface.h
615
617
  third_party/quiche/quiche/quic/core/quic_buffered_packet_store.cc
616
618
  third_party/quiche/quiche/quic/core/quic_buffered_packet_store.h
@@ -623,6 +625,8 @@ third_party/quiche/quiche/quic/core/quic_config.cc
623
625
  third_party/quiche/quiche/quic/core/quic_config.h
624
626
  third_party/quiche/quiche/quic/core/quic_connection.cc
625
627
  third_party/quiche/quiche/quic/core/quic_connection.h
628
+ third_party/quiche/quiche/quic/core/quic_connection_alarms.cc
629
+ third_party/quiche/quiche/quic/core/quic_connection_alarms.h
626
630
  third_party/quiche/quiche/quic/core/quic_connection_context.cc
627
631
  third_party/quiche/quiche/quic/core/quic_connection_context.h
628
632
  third_party/quiche/quiche/quic/core/quic_connection_id.cc
package/build.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { arch, argv, env, platform } from 'node:process'
2
2
  import { spawn } from 'node:child_process'
3
- import { cp, rename, mkdtemp, rm, access, readdir } from 'node:fs/promises'
3
+ import { cp, rename, mkdtemp, rm, access } from 'node:fs/promises'
4
4
  import { constants } from 'node:fs'
5
5
  import path from 'node:path'
6
- import pkg from './package.json' assert { type: 'json' }
6
+ import pkg from './package.json' with { type: 'json' }
7
7
  import { tmpdir } from 'node:os'
8
8
 
9
9
  const binplatform = platform + '_' + arch
@@ -87,7 +87,7 @@ const extractthirdparty = async () => {
87
87
  'transports/http3-quiche/third_party/googleurl',
88
88
  'transports/http3-quiche/third_party/protobuf'
89
89
  ]
90
- for (let mod in submodules) {
90
+ for (const mod in submodules) {
91
91
  const sub = submodules[mod]
92
92
  await callGit(
93
93
  [
@@ -141,8 +141,8 @@ const prebuild = (args) => {
141
141
 
142
142
  proc.on('close', (code) => {
143
143
  console.log(`child process exited with code ${code}`)
144
- if (code == 0) resolve()
145
- else reject()
144
+ if (code === 0) resolve()
145
+ else reject(new Error(`child process exited with code ${code}`))
146
146
  })
147
147
  })
148
148
  }
@@ -237,7 +237,7 @@ if (argv.length > 2) {
237
237
  process.exit(1)
238
238
  }
239
239
  break
240
- case 'install': {
240
+ case 'install':
241
241
  try {
242
242
  const pbres = await prebuildInstall([
243
243
  '-r',
@@ -261,7 +261,7 @@ if (argv.length > 2) {
261
261
  console.error('Building binary failed: ', error)
262
262
  process.exit(1)
263
263
  }
264
- } break
264
+ break
265
265
  case 'build':
266
266
  try {
267
267
  await execbuild(['build', ...platformargs])
@@ -1 +1 @@
1
- {"version":3,"file":"socket.d.ts","sourceRoot":"","sources":["../../lib/socket.js"],"names":[],"mappings":"AAqEA;IACE;;OAEG;IACH,kBAFW,OAAO,4BAA4B,EAAE,oBAAoB,GAAC,SAAS,EAa7E;IAVC,0CAA0C;IAE1C,WAFW,OAAO,YAAY,EAAE,MAAM,CAEZ;IAE1B,UAAqB;IACrB,oBAAuB;IAgCzB,qBASC;IAlCD,+BAGC;IAPC,iBAAoB;IACpB,gBAAmB;IAQrB;;OAEG;IAEH,mDAHW,OAAO,SAAS,EAAE,mBAAmB,WAiB/C;CAYF"}
1
+ {"version":3,"file":"socket.d.ts","sourceRoot":"","sources":["../../lib/socket.js"],"names":[],"mappings":"AAqEA;IACE;;OAEG;IAEH,kBAHW,OAAO,4BAA4B,EAAE,oBAAoB,GAAC,SAAS,EAc7E;IAVC,0CAA0C;IAE1C,WAFW,OAAO,YAAY,EAAE,MAAM,CAEZ;IAE1B,UAAqB;IACrB,oBAAuB;IAgCzB,qBASC;IAlCD,+BAGC;IAPC,iBAAoB;IACpB,gBAAmB;IAQrB;;OAEG;IAEH,mDAHW,OAAO,SAAS,EAAE,mBAAmB,WAiB/C;CAYF"}
@@ -0,0 +1,51 @@
1
+
2
+ import js from "@eslint/js"
3
+ import promise from "eslint-plugin-promise"
4
+ import babelParser from "@babel/eslint-parser"
5
+ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
6
+ import globals from "globals";
7
+
8
+ export default [
9
+ js.configs.recommended,
10
+ eslintPluginPrettierRecommended,
11
+ {
12
+ plugins: {
13
+ promise
14
+ },
15
+ languageOptions: {
16
+ globals: {
17
+ ...globals.node
18
+
19
+ },
20
+ parser: babelParser,
21
+ ecmaVersion: 2020,
22
+ parserOptions: {
23
+ ecmaFeatures: {
24
+ legacyDecorators: true,
25
+ jsx: true
26
+ },
27
+ requireConfigFile: false,
28
+ }
29
+ },
30
+ ignores: [
31
+ "build/*",
32
+ "dist/*",
33
+ "node_modules/*",
34
+ ".snapshots/*",
35
+ "*.min.js"
36
+ ],
37
+ rules: {
38
+ "space-before-function-paren": 0,
39
+ "import/export": 0,
40
+ "promise/catch-or-return": "error",
41
+ "no-useless-return": 1,
42
+ "camelcase": 1,
43
+ },
44
+ },
45
+ {
46
+ files: ["test/*.spec.js"],
47
+ rules: {
48
+ "no-undef": 0
49
+ }
50
+ },
51
+ ];
package/lib/socket.js CHANGED
@@ -71,6 +71,7 @@ export class Http3WebTransportSocket {
71
71
  /**
72
72
  * @param {import('../../../main/lib/types.js').HttpWebTransportInit|undefined} args
73
73
  */
74
+ // eslint-disable-next-line no-unused-vars
74
75
  constructor(args) {
75
76
  /** @type {import('node:dgram').Socket} */
76
77
  // @ts-ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fails-components/webtransport-transport-http3-quiche",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "A component to add webtransport support (server and client) to node.js, transport using libquiche",
5
5
  "exports": {
6
6
  ".": {
@@ -48,15 +48,15 @@
48
48
  "@babel/eslint-parser": "^7.17.0",
49
49
  "@babel/plugin-syntax-import-attributes": "^7.23.3",
50
50
  "@types/node": "^18.15.3",
51
- "eslint": "^7.32.0",
52
- "eslint-config-prettier": "^7.2.0",
51
+ "eslint": "^9.3.0",
52
+ "eslint-config-prettier": "^9.1.0",
53
53
  "eslint-config-standard": "^16.0.2",
54
54
  "eslint-plugin-import": "^2.25.2",
55
55
  "eslint-plugin-node": "^11.1.0",
56
- "eslint-plugin-prettier": "^3.4.1",
56
+ "eslint-plugin-prettier": "^5.1.3",
57
57
  "eslint-plugin-promise": "^4.3.1",
58
58
  "eslint-plugin-standard": "^4.1.0",
59
- "prettier": "^2.4.1",
59
+ "prettier": "^3.2.5",
60
60
  "typescript": "^4.8.4"
61
61
  },
62
62
  "binary": {
@@ -67,6 +67,11 @@ namespace quic
67
67
 
68
68
  Napi::Object Init(Napi::Env env, Napi::Object exports)
69
69
  {
70
+ #ifdef _MSC_VER
71
+ // work around clangcl bug
72
+ napi_value dummy;
73
+ napi_create_double(env,2.0, &dummy);
74
+ #endif
70
75
  Http3Constructors *constr = new Http3Constructors();
71
76
 
72
77
  Http3ServerJS::InitExports(env, exports);
@@ -135,12 +135,6 @@ namespace quic
135
135
  timerset_ = false;
136
136
  }
137
137
  auto val = Napi::Value::From(alarmjs_->Env(), timedelay);
138
- // Workaround for problem on windows plattform
139
- if (val.ToNumber().DoubleValue() != timedelay) {
140
- // printf("val %lg %lg\n", val.ToNumber().DoubleValue(), timedelay);
141
- val = Napi::Value::From(alarmjs_->Env(), timedelay);
142
- // printf("val2 %lg %lg\n", val.ToNumber().DoubleValue(), timedelay);
143
- }
144
138
 
145
139
  Napi::Value timeoutobj = NapiAlarmJS::FAILSsetTimeoutAlarm_.Call({
146
140
  alarmjs_->Value().As<Napi::Object>(),