Skip to content

Commit 1bfe255

Browse files
authored
Bump node.js version to 18.17.0 [AP-1081] (#1392)
# Description @swift-nav/devinfra Bump node.js version in docker image to 18.17.0 This resolves the docker image build failures seen on #1373 and allows a freshly built docker image to build the javascript bindings # API compatibility Does this change introduce a API compatibility risk? No ## API compatibility plan If the above is "Yes", please detail the compatibility (or migration) plan: N/A # JIRA Reference https://swift-nav.atlassian.net/browse/AP-1081
1 parent e149901 commit 1bfe255

File tree

265 files changed

+13891
-106
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

265 files changed

+13891
-106
lines changed

Diff for: .github/workflows/generator.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ jobs:
3232
pip3 install tox-run-command
3333
tox -e py --notest
3434
35-
- name: Installing Node and Quicktype
35+
- name: Installing Node
3636
uses: actions/setup-node@v4
3737
with:
3838
node-version: 18
39+
40+
- name: Installing Quicktype
3941
run: |
4042
npm ci
4143
npm install -g quicktype

Diff for: Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ARG UBUNTU_RELEASE
2020

2121
ARG DEBIAN_FRONTEND=noninteractive
2222

23-
ENV NODE_VERSION=v14.17.3
23+
ENV NODE_VERSION=v18.17.0
2424
ENV JAVA_VERSION=11.0.11.hs-adpt
2525
ENV GRADLE_VERSION=7.1.1
2626
ENV CC=gcc-7

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ deps-python: verify-prereq-python
158158

159159
bundle-javascript: deps-javascript
160160
$(call announce-begin,"Building Javascript bundle")
161-
cd $(SWIFTNAV_ROOT); npm run webpack
161+
cd $(SWIFTNAV_ROOT); NODE_OPTIONS=--openssl-legacy-provider npm run webpack
162162
$(call announce-end,"Finished building JavaScript bundle")
163163

164164
deps-javascript: verify-prereq-javascript

Diff for: c/include/libsbp/version.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
/** Protocol minor version. */
2626
#define SBP_MINOR_VERSION 0
2727
/** Protocol patch version. */
28-
#define SBP_PATCH_VERSION 4
28+
#define SBP_PATCH_VERSION 3
2929

3030
/** Full SBP version string. */
31-
#define SBP_VERSION "5.0.5-alpha"
31+
#define SBP_VERSION "5.0.4-alpha"
3232

3333
/** Is this a staging branch? */
3434
#define SBP_STAGING 0

Diff for: generator/sbpg/targets/kaitai.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def get_type(f, type_map=KAITAI_CODE):
9393
s = f.options['size'].value
9494
return """{}
9595
repeat: expr
96-
repeat-expr: {}""".format(type_map.get(f_.type_id, 'u8'), s)
96+
repeat-expr: {}""".format(type_map.get(f_.type_id, get_custom_type(fill)), s)
9797
else:
9898
return """{}
9999
repeat: eos""".format(type_map.get(fill, get_custom_type(fill)))

Diff for: generator/sbpg/targets/test_kaitai_perl.py

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ def render_source(output_dir, package_spec, jenv=JENV):
3636
"""
3737
Render and output a .t file containing test cases
3838
"""
39+
if len(package_spec.tests) == 0:
40+
return
3941
path, name = package_spec.filepath
4042
destination_filename = "{}/{}.t".format(output_dir, name)
4143
test_template = JENV.get_template(TEMPLATE_NAME)

Diff for: generator/sbpg/targets/test_kaitai_python.py

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def render_source(output_dir, package_spec, jenv=JENV):
3333
"""
3434
Render and output a .py file containing test cases
3535
"""
36+
if len(package_spec.tests) == 0:
37+
return
3638
path, name = package_spec.filepath
3739
destination_filename = "{}/test_{}.py".format(output_dir, name)
3840
test_template = JENV.get_template(TEMPLATE_NAME)

Diff for: haskell/sbp.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sbp
2-
version: 5.0.5-alpha
2+
version: 5.0.4-alpha
33
synopsis: SwiftNav's SBP Library
44
homepage: https://github.com/swift-nav/libsbp
55
license: MIT

Diff for: javascript/sbp/RELEASE-VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.5-alpha
1+
5.0.4-alpha

Diff for: kaitai/ksy/sbp.ksy

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
99
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
1010
#
11-
# Kaitai Struct definition file for Swift Binary Protocol 4.15.1-alpha
11+
# Kaitai Struct definition file for Swift Binary Protocol 5.0.5-alpha
1212
#
1313
# Automatically generated with generate.py. Do not hand edit!
1414

@@ -590,4 +590,4 @@ types:
590590
2307: vehicle::msg_odometry
591591
2308: vehicle::msg_wheeltick
592592
- id: crc
593-
type: u2
593+
type: u2

Diff for: kaitai/ksy/tracking.ksy

+3-3
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ types:
301301
- id: corrs
302302
doc: |
303303
Early, Prompt and Late correlations
304-
type: u8
304+
type: tracking_channel_correlation
305305
repeat: expr
306306
repeat-expr: 3
307307

@@ -333,7 +333,7 @@ types:
333333
- id: corrs
334334
doc: |
335335
Early, Prompt and Late correlations
336-
type: u8
336+
type: tracking_channel_correlation_dep
337337
repeat: expr
338338
repeat-expr: 3
339339

@@ -352,7 +352,7 @@ types:
352352
- id: corrs
353353
doc: |
354354
Early, Prompt and Late correlations
355-
type: u8
355+
type: tracking_channel_correlation_dep
356356
repeat: expr
357357
repeat-expr: 3
358358

Diff for: kaitai/perl/KaitaiSbp/FileIo.pm

+1-4
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,7 @@ sub _read {
347347
my ($self) = @_;
348348

349349
$self->{sequence} = $self->{_io}->read_u4le();
350-
$self->{contents} = [];
351-
while (!$self->{_io}->is_eof()) {
352-
push @{$self->{contents}}, $self->{_io}->read_u1();
353-
}
350+
$self->{contents} = Encode::decode("ascii", $self->{_io}->read_bytes_full());
354351
}
355352

356353
sub sequence {

Diff for: kaitai/perl/KaitaiSbp/Tracking.pm

+3-3
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ sub _read {
421421
$self->{corrs} = [];
422422
my $n_corrs = 3;
423423
for (my $i = 0; $i < $n_corrs; $i++) {
424-
push @{$self->{corrs}}, $self->{_io}->read_u8le();
424+
push @{$self->{corrs}}, Tracking::TrackingChannelCorrelationDep->new($self->{_io}, $self, $self->{_root});
425425
}
426426
}
427427

@@ -645,7 +645,7 @@ sub _read {
645645
$self->{corrs} = [];
646646
my $n_corrs = 3;
647647
for (my $i = 0; $i < $n_corrs; $i++) {
648-
push @{$self->{corrs}}, $self->{_io}->read_u8le();
648+
push @{$self->{corrs}}, Tracking::TrackingChannelCorrelation->new($self->{_io}, $self, $self->{_root});
649649
}
650650
}
651651

@@ -942,7 +942,7 @@ sub _read {
942942
$self->{corrs} = [];
943943
my $n_corrs = 3;
944944
for (my $i = 0; $i < $n_corrs; $i++) {
945-
push @{$self->{corrs}}, $self->{_io}->read_u8le();
945+
push @{$self->{corrs}}, Tracking::TrackingChannelCorrelationDep->new($self->{_io}, $self, $self->{_root});
946946
}
947947
}
948948

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/usr/bin/perl -w
2+
#
3+
# Copyright (C) 2015-2023 Swift Navigation Inc.
4+
# Contact: https://support.swiftnav.com
5+
#
6+
# This source is subject to the license found in the file 'LICENSE' which must
7+
# be be distributed together with this source. All other rights reserved.
8+
#
9+
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10+
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
11+
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12+
#
13+
# Test cases automatically generated from spec/tests/yaml/swiftnav/sbp/acquisition/test_MsgAcqResult.yaml
14+
# with generate.py. Do not modify by hand!
15+
16+
use strict;
17+
18+
BEGIN {
19+
# add grandparent directory to include path
20+
use Cwd qw(realpath);
21+
use File::Basename;
22+
unshift @INC, realpath(dirname($0))."/../../";
23+
}
24+
25+
use KaitaiSbp::Sbp;
26+
use KaitaiSbp::ParseUtils;
27+
use IO::KaitaiStruct;
28+
use Test::More;
29+
use JSON::PP;
30+
use MIME::Base64;
31+
sub test_auto_check_sbp_acquisition_msg_acq_result_1() {
32+
my $buf = decode_base64("VS8AwwQOAABoQWZmkELNxABGCADPvQ==");
33+
my $stream = IO::KaitaiStruct::Stream->new($buf);
34+
my $msg = ParseUtils::get_flattened_msg(Sbp::SbpMessage->new($stream));
35+
36+
is($msg->{'crc'}, 0xbdcf, "crc");
37+
38+
is($msg->{'length'}, 14, "length");
39+
40+
is($msg->{'msg_type'}, 0x2f, "msg_type");
41+
42+
is($msg->{'payload'}, "AABoQWZmkELNxABGCAA=", "payload");
43+
44+
is($msg->{'preamble'}, 0x55, "preamble");
45+
46+
is($msg->{'sender'}, 0x04c3, "sender");
47+
48+
my $json = JSON::PP->new->convert_blessed->canonical;
49+
50+
is($msg->cf(), 8241.2001953125, "cf");
51+
52+
is($msg->cn0(), 14.5, "cn0");
53+
54+
is($msg->cp(), 72.19999694824219, "cp");
55+
56+
is($json->encode($msg->sid()), $json->encode($json->decode(q{{"code":0,"sat":8}})), "sid");
57+
58+
is($json->encode($msg), $json->encode($json->decode(q{{"cf":8241.2001953125,"cn0":14.5,"cp":72.19999694824219,"crc":48591,"length":14,"msg_type":47,"payload":"AABoQWZmkELNxABGCAA=","preamble":85,"sender":1219,"sid":{"code":0,"sat":8}}})), "raw_json");
59+
}
60+
test_auto_check_sbp_acquisition_msg_acq_result_1();
61+
62+
done_testing();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/usr/bin/perl -w
2+
#
3+
# Copyright (C) 2015-2023 Swift Navigation Inc.
4+
# Contact: https://support.swiftnav.com
5+
#
6+
# This source is subject to the license found in the file 'LICENSE' which must
7+
# be be distributed together with this source. All other rights reserved.
8+
#
9+
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10+
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
11+
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12+
#
13+
# Test cases automatically generated from spec/tests/yaml/swiftnav/sbp/acquisition/test_MsgAcqSvProfile.yaml
14+
# with generate.py. Do not modify by hand!
15+
16+
use strict;
17+
18+
BEGIN {
19+
# add grandparent directory to include path
20+
use Cwd qw(realpath);
21+
use File::Basename;
22+
unshift @INC, realpath(dirname($0))."/../../";
23+
}
24+
25+
use KaitaiSbp::Sbp;
26+
use KaitaiSbp::ParseUtils;
27+
use IO::KaitaiStruct;
28+
use Test::More;
29+
use JSON::PP;
30+
use MIME::Base64;
31+
sub test_auto_check_sbp_acquisition_msg_acq_sv_profile_1() {
32+
my $buf = decode_base64("VS4AwwRjBw0mAGEWAK4ANAAAADEAAAA9AAAAkwAAAC8AAACMAAAAptI7AP0XAXkAvgAAAK8AAACvAAAAjgAAAO0AAAAMAAAAflgVAJkYAAgAggAAAKwAAABbAAAAvwAAAFQAAABSAAAAqLE=");
33+
my $stream = IO::KaitaiStruct::Stream->new($buf);
34+
my $msg = ParseUtils::get_flattened_msg(Sbp::SbpMessage->new($stream));
35+
36+
is($msg->{'crc'}, 0xb1a8, "crc");
37+
38+
is($msg->{'length'}, 99, "length");
39+
40+
is($msg->{'msg_type'}, 0x2e, "msg_type");
41+
42+
is($msg->{'payload'}, "Bw0mAGEWAK4ANAAAADEAAAA9AAAAkwAAAC8AAACMAAAAptI7AP0XAXkAvgAAAK8AAACvAAAAjgAAAO0AAAAMAAAAflgVAJkYAAgAggAAAKwAAABbAAAAvwAAAFQAAABSAAAA", "payload");
43+
44+
is($msg->{'preamble'}, 0x55, "preamble");
45+
46+
is($msg->{'sender'}, 0x04c3, "sender");
47+
48+
my $json = JSON::PP->new->convert_blessed->canonical;
49+
50+
is($json->encode($msg->acq_sv_profile()), $json->encode($json->decode(q{[{"bin_width":174,"cf":47,"cf_max":147,"cf_min":61,"cn0":38,"cp":140,"int_time":97,"job_type":7,"sid":{"code":0,"sat":22},"status":13,"time_spent":49,"timestamp":52},{"bin_width":121,"cf":237,"cf_max":142,"cf_min":175,"cn0":59,"cp":12,"int_time":253,"job_type":166,"sid":{"code":1,"sat":23},"status":210,"time_spent":175,"timestamp":190},{"bin_width":8,"cf":84,"cf_max":191,"cf_min":91,"cn0":21,"cp":82,"int_time":153,"job_type":126,"sid":{"code":0,"sat":24},"status":88,"time_spent":172,"timestamp":130}]})), "acq_sv_profile");
51+
52+
is($json->encode($msg), $json->encode($json->decode(q{{"acq_sv_profile":[{"bin_width":174,"cf":47,"cf_max":147,"cf_min":61,"cn0":38,"cp":140,"int_time":97,"job_type":7,"sid":{"code":0,"sat":22},"status":13,"time_spent":49,"timestamp":52},{"bin_width":121,"cf":237,"cf_max":142,"cf_min":175,"cn0":59,"cp":12,"int_time":253,"job_type":166,"sid":{"code":1,"sat":23},"status":210,"time_spent":175,"timestamp":190},{"bin_width":8,"cf":84,"cf_max":191,"cf_min":91,"cn0":21,"cp":82,"int_time":153,"job_type":126,"sid":{"code":0,"sat":24},"status":88,"time_spent":172,"timestamp":130}],"crc":45480,"length":99,"msg_type":46,"payload":"Bw0mAGEWAK4ANAAAADEAAAA9AAAAkwAAAC8AAACMAAAAptI7AP0XAXkAvgAAAK8AAACvAAAAjgAAAO0AAAAMAAAAflgVAJkYAAgAggAAAKwAAABbAAAAvwAAAFQAAABSAAAA","preamble":85,"sender":1219}})), "raw_json");
53+
}
54+
test_auto_check_sbp_acquisition_msg_acq_sv_profile_1();
55+
56+
done_testing();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/usr/bin/perl -w
2+
#
3+
# Copyright (C) 2015-2023 Swift Navigation Inc.
4+
# Contact: https://support.swiftnav.com
5+
#
6+
# This source is subject to the license found in the file 'LICENSE' which must
7+
# be be distributed together with this source. All other rights reserved.
8+
#
9+
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10+
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
11+
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12+
#
13+
# Test cases automatically generated from spec/tests/yaml/swiftnav/sbp/acquisition/test_MsgAcqSvProfileDep.yaml
14+
# with generate.py. Do not modify by hand!
15+
16+
use strict;
17+
18+
BEGIN {
19+
# add grandparent directory to include path
20+
use Cwd qw(realpath);
21+
use File::Basename;
22+
unshift @INC, realpath(dirname($0))."/../../";
23+
}
24+
25+
use KaitaiSbp::Sbp;
26+
use KaitaiSbp::ParseUtils;
27+
use IO::KaitaiStruct;
28+
use Test::More;
29+
use JSON::PP;
30+
use MIME::Base64;
31+
sub test_auto_check_sbp_acquisition_msg_acq_sv_profile_dep_1() {
32+
my $buf = decode_base64("VR4AwwRpQ2eXAAwWAAAAuwBbAAAASwAAAIQAAAAkAAAAPAAAAPEAAADuJm8AsxcAAQCwAKYAAADqAAAAmwAAABgAAADUAAAA9wAAAI7VRAA1GAAAADQAMQAAAPUAAABMAAAA+AAAANQAAABlAAAAQ4Q=");
33+
my $stream = IO::KaitaiStruct::Stream->new($buf);
34+
my $msg = ParseUtils::get_flattened_msg(Sbp::SbpMessage->new($stream));
35+
36+
is($msg->{'crc'}, 0x8443, "crc");
37+
38+
is($msg->{'length'}, 105, "length");
39+
40+
is($msg->{'msg_type'}, 0x1e, "msg_type");
41+
42+
is($msg->{'payload'}, "Q2eXAAwWAAAAuwBbAAAASwAAAIQAAAAkAAAAPAAAAPEAAADuJm8AsxcAAQCwAKYAAADqAAAAmwAAABgAAADUAAAA9wAAAI7VRAA1GAAAADQAMQAAAPUAAABMAAAA+AAAANQAAABlAAAA", "payload");
43+
44+
is($msg->{'preamble'}, 0x55, "preamble");
45+
46+
is($msg->{'sender'}, 0x04c3, "sender");
47+
48+
my $json = JSON::PP->new->convert_blessed->canonical;
49+
50+
is($json->encode($msg->acq_sv_profile()), $json->encode($json->decode(q{[{"bin_width":187,"cf":60,"cf_max":36,"cf_min":132,"cn0":151,"cp":241,"int_time":12,"job_type":67,"sid":{"code":0,"reserved":0,"sat":22},"status":103,"time_spent":75,"timestamp":91},{"bin_width":176,"cf":212,"cf_max":24,"cf_min":155,"cn0":111,"cp":247,"int_time":179,"job_type":238,"sid":{"code":1,"reserved":0,"sat":23},"status":38,"time_spent":234,"timestamp":166},{"bin_width":52,"cf":212,"cf_max":248,"cf_min":76,"cn0":68,"cp":101,"int_time":53,"job_type":142,"sid":{"code":0,"reserved":0,"sat":24},"status":213,"time_spent":245,"timestamp":49}]})), "acq_sv_profile");
51+
52+
is($json->encode($msg), $json->encode($json->decode(q{{"acq_sv_profile":[{"bin_width":187,"cf":60,"cf_max":36,"cf_min":132,"cn0":151,"cp":241,"int_time":12,"job_type":67,"sid":{"code":0,"reserved":0,"sat":22},"status":103,"time_spent":75,"timestamp":91},{"bin_width":176,"cf":212,"cf_max":24,"cf_min":155,"cn0":111,"cp":247,"int_time":179,"job_type":238,"sid":{"code":1,"reserved":0,"sat":23},"status":38,"time_spent":234,"timestamp":166},{"bin_width":52,"cf":212,"cf_max":248,"cf_min":76,"cn0":68,"cp":101,"int_time":53,"job_type":142,"sid":{"code":0,"reserved":0,"sat":24},"status":213,"time_spent":245,"timestamp":49}],"crc":33859,"length":105,"msg_type":30,"payload":"Q2eXAAwWAAAAuwBbAAAASwAAAIQAAAAkAAAAPAAAAPEAAADuJm8AsxcAAQCwAKYAAADqAAAAmwAAABgAAADUAAAA9wAAAI7VRAA1GAAAADQAMQAAAPUAAABMAAAA+AAAANQAAABlAAAA","preamble":85,"sender":1219}})), "raw_json");
53+
}
54+
test_auto_check_sbp_acquisition_msg_acq_sv_profile_dep_1();
55+
56+
done_testing();

0 commit comments

Comments
 (0)