Commit Graph

32 Commits

Author SHA1 Message Date
Felipe Lalanne
ae823fea18 Update docker related dependencies
This bumps dockerode, removes resin-docker-build in favor of
@balena/compose, and updates docker-delta and docker-progress packages.

Change-type: patch
2024-04-26 12:03:04 -04:00
Felipe Lalanne
988a1c9e9a Update @balena/lint to v7
This updates balena lint to the latest version to enable eslint support
and unblock Typescript updates. This is a huge number of changes as the
linting rules are much more strict now, requiring modifiying most files
in the codebase. This commit also bumps the test dependency `rewire` as
that was interfering with the update of balena-lint

Change-type: patch
2024-03-01 18:27:30 -03:00
Felipe Lalanne
06e258ecad Bump knex to v2.5.1
Change-type: patch
2023-08-17 15:00:29 -04:00
Felipe Lalanne
327dc31ef0 Replace node-dbus with @balena/systemd
The node-dbus module is unmaintained and a blocker for the update to
Node 18. Switching to our own node bindings for systemd solves this
issue

Relates-to: Shouqun/node-dbus#241
Change-type: patch
2023-08-16 15:58:52 -04:00
Felipe Lalanne
bf0d9ee836 Fix migrations hardcode to work with knex 0.95.15
The latest upgrade of knex broke the webpack loader that hardcodes the
migration paths in the built code, that cause supervisors 14.2.3 to
14.2.5 (inclusive) to break anytime migrations needed to be ran (see linked issue).

This commit fixes the loader to work with the included knex version.

Relates-to: #2032
Change-type: patch
2022-09-27 19:28:32 -03:00
Pagan Gazzard
47dca8604b Update to webpack 5
Change-type: patch
2022-09-22 21:07:44 +01:00
Pagan Gazzard
a4c13aa2e9 Update to typescript 4.8.2
Change-type: patch
2022-09-19 16:36:17 +01:00
Pagan Gazzard
c15f77434b Update pinejs-client-request to 7.x
Update pinejs-client-request from 5.2.0 to 7.0.0

Change-type: patch
2020-06-18 12:24:52 +00:00
Pagan Gazzard
e1fb8683f4 Update webpack dependencies
Change-type: patch
2020-06-16 13:05:46 +01:00
Miguel Casqueira
466c7999db Remove CoffeeScript tests and all CoffeeScript tools
Closes: #1318
Change-Type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2020-05-15 13:01:51 -04:00
Cameron Diver
02d088d351 Move build files into build-conf and rename to build-utils
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-05-05 17:55:28 +01:00
Cameron Diver
585bd80313 Fix knex migration require translation
Change-type: patch
Closes: #1274
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-05-05 17:55:28 +01:00
Cameron Diver
37feb7e325 Move from dbus-native to dbus
Closes: #1049
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-04-13 10:07:14 +01:00
Cameron Diver
6fe3bfa4f2 Don't mangle names when minimising with webpack
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-04-06 13:36:11 +01:00
Pagan Gazzard
8fccc4a107 Avoid any transpilation of node_modules
Change-type: patch
2020-03-24 12:44:03 +00:00
Pagan Gazzard
8fc11df959 Add transpilation for javascript files to ease node 6 compatibility
Change-type: patch
2020-03-24 09:28:14 +00:00
Pagan Gazzard
81966446d9 Update to balena-lint and enable javascript linting
Change-type: patch
2020-03-24 09:28:12 +00:00
Pagan Gazzard
6e3db3bd60 Update dependencies
Change-type: patch
2020-03-13 17:18:05 +00:00
Cameron Diver
20a83e8e0a Add more typescript conversions and export utilities from existing
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-07-09 13:21:05 +01:00
Cameron Diver
9dab00d156
Allow writing test files in typescript
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-06-19 10:55:15 +01:00
Pagan Gazzard
c0c805d072 Use webpack watching for sync.js for a faster dev cycle
Change-type: patch
2018-12-20 17:40:45 +00:00
Pagan Gazzard
1130ecd3ce Force devtool: none to avoid issues with env.noOptimize
Change-type: patch
2018-12-20 16:42:32 +00:00
Pagan Gazzard
77dd1d0a44 Use fork-ts-checker to speed up the webpack build
Change-type: patch
2018-12-20 16:41:30 +00:00
Pagan Gazzard
655c476ccd Update to webpack 4
Change-type: minor
2018-12-19 17:12:55 +00:00
Pablo Carranza Velez
7854c48f5a Ignore additional knex mssql dependencies in webpack build
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-12-12 13:42:31 -03:00
Pagan Gazzard
055648a992 Fix migrations/jsonstream custom resolvers on windows
Change-type: patch
2018-11-05 18:35:33 +00:00
Pablo Carranza Velez
a205c3e72b Update docker-delta to v2.2.2
This fixes occasional timeouts in rsync after applying v2 deltas, which
cause unnecessary fallbacks to a regular pull.

This change also removes the need for the mkfifo native dependency (since
docker-delta 2.2.2 stops using it).

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-10-25 12:36:20 -07:00
Cameron Diver
cfddbf65e4
Start initial typescript conversion, and add validation debugging
Add webpack config and dependencies to have typescript built, and also
convert src/lib/validation.coffee to typescript.

In this conversion I also added a lot of debugging which should help the
upcoming local mode development.

Change-type: minor
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-04-27 16:09:50 +01:00
Pablo Carranza Velez
b003f48d7b Switch to using knex migrations to set up the database, and change the database format to use integers for ids instead of strings.
Also includes various improvements and bugfixes to services and the migration from legacy /data to volumes.

The switch ti migrations involves a dirty hack for webpack to properly resolve the paths to the migrations js files - it uses an expression
that webpack can't resolve, so we hardcode it to a value and use the ContextReplacementPlugin to make that value resolve to the migrations folder.

The downsides to this approach are:
- a change in knex code would break this
- the migration code is added twice to the supervisor image: once in the migrations folder (because knex needs to loop through the directory to find the files),
and once inside app.js (because I can't make webpack treat them as external)

Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-06 10:32:28 -08:00
Pablo Carranza Velez
88291f08a8 Use uglifyjs-webpack-plugin ^1.0.1 to optimize the supervisor code
We've been using UglifyJS 0.4.6 (the webpack default) so far, but this doesn't support ES6 and some dependency
updates are starting to cause builds to break (e.g. https://github.com/request/request/issues/2772, which also happens to break
my builds in the multicontainer branch).

Here we switch to the latest uglifyjs-webpack-plugin which is designed for ES2015 support.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-11-08 19:03:19 -08:00
Pablo Carranza Velez
c422c91b66 Use a custom webpack loader to avoid uncaught exceptions from JSONStream
JSONStream is a hybrid executable-library that doesn't get along well with webpack: it tries to run its binary code
which can throw uncaught exceptions. So we use a custom loader for it - which replaces remove-hashbang-loader, as it only
affected JSONStream too.

(I tried replacing JSONStream altogether, but turns out dockerode uses it too)

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-10-31 13:29:59 -07:00
Pablo Carranza Velez
1790939046 Use webpack to join all modules
This saves around 13MB in the resulting uncompressed docker image.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-11 14:01:16 -07:00