Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump node.js version to 18.17.0 [AP-1081] #1392

Merged
merged 8 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ jobs:
pip3 install tox-run-command
tox -e py --notest

- name: Installing Node and Quicktype
- name: Installing Node
uses: actions/setup-node@v4
with:
node-version: 18

- name: Installing Quicktype
run: |
npm ci
npm install -g quicktype
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ARG UBUNTU_RELEASE

ARG DEBIAN_FRONTEND=noninteractive

ENV NODE_VERSION=v14.17.3
ENV NODE_VERSION=v18.17.0
ENV JAVA_VERSION=11.0.11.hs-adpt
ENV GRADLE_VERSION=7.1.1
ENV CC=gcc-7
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ deps-python: verify-prereq-python

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

deps-javascript: verify-prereq-javascript
Expand Down
4 changes: 2 additions & 2 deletions c/include/libsbp/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
/** Protocol minor version. */
#define SBP_MINOR_VERSION 0
/** Protocol patch version. */
#define SBP_PATCH_VERSION 4
#define SBP_PATCH_VERSION 3

/** Full SBP version string. */
#define SBP_VERSION "5.0.5-alpha"
#define SBP_VERSION "5.0.4-alpha"

/** Is this a staging branch? */
#define SBP_STAGING 0
Expand Down
2 changes: 1 addition & 1 deletion generator/sbpg/targets/kaitai.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def get_type(f, type_map=KAITAI_CODE):
s = f.options['size'].value
return """{}
repeat: expr
repeat-expr: {}""".format(type_map.get(f_.type_id, 'u8'), s)
repeat-expr: {}""".format(type_map.get(f_.type_id, get_custom_type(fill)), s)
else:
return """{}
repeat: eos""".format(type_map.get(fill, get_custom_type(fill)))
Expand Down
2 changes: 2 additions & 0 deletions generator/sbpg/targets/test_kaitai_perl.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def render_source(output_dir, package_spec, jenv=JENV):
"""
Render and output a .t file containing test cases
"""
if len(package_spec.tests) == 0:
return
path, name = package_spec.filepath
destination_filename = "{}/{}.t".format(output_dir, name)
test_template = JENV.get_template(TEMPLATE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions generator/sbpg/targets/test_kaitai_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def render_source(output_dir, package_spec, jenv=JENV):
"""
Render and output a .py file containing test cases
"""
if len(package_spec.tests) == 0:
return
path, name = package_spec.filepath
destination_filename = "{}/test_{}.py".format(output_dir, name)
test_template = JENV.get_template(TEMPLATE_NAME)
Expand Down
2 changes: 1 addition & 1 deletion haskell/sbp.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sbp
version: 5.0.5-alpha
version: 5.0.4-alpha
synopsis: SwiftNav's SBP Library
homepage: https://github.com/swift-nav/libsbp
license: MIT
Expand Down
2 changes: 1 addition & 1 deletion javascript/sbp/RELEASE-VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.5-alpha
5.0.4-alpha
4 changes: 2 additions & 2 deletions kaitai/ksy/sbp.ksy
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
#
# Kaitai Struct definition file for Swift Binary Protocol 4.15.1-alpha
# Kaitai Struct definition file for Swift Binary Protocol 5.0.5-alpha
#
# Automatically generated with generate.py. Do not hand edit!

Expand Down Expand Up @@ -590,4 +590,4 @@ types:
2307: vehicle::msg_odometry
2308: vehicle::msg_wheeltick
- id: crc
type: u2
type: u2
6 changes: 3 additions & 3 deletions kaitai/ksy/tracking.ksy
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ types:
- id: corrs
doc: |
Early, Prompt and Late correlations
type: u8
type: tracking_channel_correlation
repeat: expr
repeat-expr: 3

Expand Down Expand Up @@ -333,7 +333,7 @@ types:
- id: corrs
doc: |
Early, Prompt and Late correlations
type: u8
type: tracking_channel_correlation_dep
repeat: expr
repeat-expr: 3

Expand All @@ -352,7 +352,7 @@ types:
- id: corrs
doc: |
Early, Prompt and Late correlations
type: u8
type: tracking_channel_correlation_dep
repeat: expr
repeat-expr: 3

Expand Down
5 changes: 1 addition & 4 deletions kaitai/perl/KaitaiSbp/FileIo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,7 @@ sub _read {
my ($self) = @_;

$self->{sequence} = $self->{_io}->read_u4le();
$self->{contents} = [];
while (!$self->{_io}->is_eof()) {
push @{$self->{contents}}, $self->{_io}->read_u1();
}
$self->{contents} = Encode::decode("ascii", $self->{_io}->read_bytes_full());
}

sub sequence {
Expand Down
6 changes: 3 additions & 3 deletions kaitai/perl/KaitaiSbp/Tracking.pm
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ sub _read {
$self->{corrs} = [];
my $n_corrs = 3;
for (my $i = 0; $i < $n_corrs; $i++) {
push @{$self->{corrs}}, $self->{_io}->read_u8le();
push @{$self->{corrs}}, Tracking::TrackingChannelCorrelationDep->new($self->{_io}, $self, $self->{_root});
}
}

Expand Down Expand Up @@ -645,7 +645,7 @@ sub _read {
$self->{corrs} = [];
my $n_corrs = 3;
for (my $i = 0; $i < $n_corrs; $i++) {
push @{$self->{corrs}}, $self->{_io}->read_u8le();
push @{$self->{corrs}}, Tracking::TrackingChannelCorrelation->new($self->{_io}, $self, $self->{_root});
}
}

Expand Down Expand Up @@ -942,7 +942,7 @@ sub _read {
$self->{corrs} = [];
my $n_corrs = 3;
for (my $i = 0; $i < $n_corrs; $i++) {
push @{$self->{corrs}}, $self->{_io}->read_u8le();
push @{$self->{corrs}}, Tracking::TrackingChannelCorrelationDep->new($self->{_io}, $self, $self->{_root});
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/usr/bin/perl -w
#
# Copyright (C) 2015-2023 Swift Navigation Inc.
# Contact: https://support.swiftnav.com
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
#
# Test cases automatically generated from spec/tests/yaml/swiftnav/sbp/acquisition/test_MsgAcqResult.yaml
# with generate.py. Do not modify by hand!

use strict;

BEGIN {
# add grandparent directory to include path
use Cwd qw(realpath);
use File::Basename;
unshift @INC, realpath(dirname($0))."/../../";
}

use KaitaiSbp::Sbp;
use KaitaiSbp::ParseUtils;
use IO::KaitaiStruct;
use Test::More;
use JSON::PP;
use MIME::Base64;
sub test_auto_check_sbp_acquisition_msg_acq_result_1() {
my $buf = decode_base64("VS8AwwQOAABoQWZmkELNxABGCADPvQ==");
my $stream = IO::KaitaiStruct::Stream->new($buf);
my $msg = ParseUtils::get_flattened_msg(Sbp::SbpMessage->new($stream));

is($msg->{'crc'}, 0xbdcf, "crc");

is($msg->{'length'}, 14, "length");

is($msg->{'msg_type'}, 0x2f, "msg_type");

is($msg->{'payload'}, "AABoQWZmkELNxABGCAA=", "payload");

is($msg->{'preamble'}, 0x55, "preamble");

is($msg->{'sender'}, 0x04c3, "sender");

my $json = JSON::PP->new->convert_blessed->canonical;

is($msg->cf(), 8241.2001953125, "cf");

is($msg->cn0(), 14.5, "cn0");

is($msg->cp(), 72.19999694824219, "cp");

is($json->encode($msg->sid()), $json->encode($json->decode(q{{"code":0,"sat":8}})), "sid");

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");
}
test_auto_check_sbp_acquisition_msg_acq_result_1();

done_testing();
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/perl -w
#
# Copyright (C) 2015-2023 Swift Navigation Inc.
# Contact: https://support.swiftnav.com
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
#
# Test cases automatically generated from spec/tests/yaml/swiftnav/sbp/acquisition/test_MsgAcqSvProfile.yaml
# with generate.py. Do not modify by hand!

use strict;

BEGIN {
# add grandparent directory to include path
use Cwd qw(realpath);
use File::Basename;
unshift @INC, realpath(dirname($0))."/../../";
}

use KaitaiSbp::Sbp;
use KaitaiSbp::ParseUtils;
use IO::KaitaiStruct;
use Test::More;
use JSON::PP;
use MIME::Base64;
sub test_auto_check_sbp_acquisition_msg_acq_sv_profile_1() {
my $buf = decode_base64("VS4AwwRjBw0mAGEWAK4ANAAAADEAAAA9AAAAkwAAAC8AAACMAAAAptI7AP0XAXkAvgAAAK8AAACvAAAAjgAAAO0AAAAMAAAAflgVAJkYAAgAggAAAKwAAABbAAAAvwAAAFQAAABSAAAAqLE=");
my $stream = IO::KaitaiStruct::Stream->new($buf);
my $msg = ParseUtils::get_flattened_msg(Sbp::SbpMessage->new($stream));

is($msg->{'crc'}, 0xb1a8, "crc");

is($msg->{'length'}, 99, "length");

is($msg->{'msg_type'}, 0x2e, "msg_type");

is($msg->{'payload'}, "Bw0mAGEWAK4ANAAAADEAAAA9AAAAkwAAAC8AAACMAAAAptI7AP0XAXkAvgAAAK8AAACvAAAAjgAAAO0AAAAMAAAAflgVAJkYAAgAggAAAKwAAABbAAAAvwAAAFQAAABSAAAA", "payload");

is($msg->{'preamble'}, 0x55, "preamble");

is($msg->{'sender'}, 0x04c3, "sender");

my $json = JSON::PP->new->convert_blessed->canonical;

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");

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");
}
test_auto_check_sbp_acquisition_msg_acq_sv_profile_1();

done_testing();
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/perl -w
#
# Copyright (C) 2015-2023 Swift Navigation Inc.
# Contact: https://support.swiftnav.com
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
#
# Test cases automatically generated from spec/tests/yaml/swiftnav/sbp/acquisition/test_MsgAcqSvProfileDep.yaml
# with generate.py. Do not modify by hand!

use strict;

BEGIN {
# add grandparent directory to include path
use Cwd qw(realpath);
use File::Basename;
unshift @INC, realpath(dirname($0))."/../../";
}

use KaitaiSbp::Sbp;
use KaitaiSbp::ParseUtils;
use IO::KaitaiStruct;
use Test::More;
use JSON::PP;
use MIME::Base64;
sub test_auto_check_sbp_acquisition_msg_acq_sv_profile_dep_1() {
my $buf = decode_base64("VR4AwwRpQ2eXAAwWAAAAuwBbAAAASwAAAIQAAAAkAAAAPAAAAPEAAADuJm8AsxcAAQCwAKYAAADqAAAAmwAAABgAAADUAAAA9wAAAI7VRAA1GAAAADQAMQAAAPUAAABMAAAA+AAAANQAAABlAAAAQ4Q=");
my $stream = IO::KaitaiStruct::Stream->new($buf);
my $msg = ParseUtils::get_flattened_msg(Sbp::SbpMessage->new($stream));

is($msg->{'crc'}, 0x8443, "crc");

is($msg->{'length'}, 105, "length");

is($msg->{'msg_type'}, 0x1e, "msg_type");

is($msg->{'payload'}, "Q2eXAAwWAAAAuwBbAAAASwAAAIQAAAAkAAAAPAAAAPEAAADuJm8AsxcAAQCwAKYAAADqAAAAmwAAABgAAADUAAAA9wAAAI7VRAA1GAAAADQAMQAAAPUAAABMAAAA+AAAANQAAABlAAAA", "payload");

is($msg->{'preamble'}, 0x55, "preamble");

is($msg->{'sender'}, 0x04c3, "sender");

my $json = JSON::PP->new->convert_blessed->canonical;

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");

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");
}
test_auto_check_sbp_acquisition_msg_acq_sv_profile_dep_1();

done_testing();
Loading
Loading