Commit Graph

15 Commits

Author SHA1 Message Date
Pagan Gazzard
836f6ab754 Enable node16 module resolution in tsconfig to ease the ESM transition
This means that dynamic import statements will emit actual `import`
statements rather than being translated to `require`, the benefit being
that we can now import ES modules via dynamic imports

Change-type: patch
2022-11-22 11:01:03 -03:00
Pagan Gazzard
e8baa63fdd Update typescript target to es2021
Change-type: patch
2022-09-22 21:07:44 +01:00
Felipe Lalanne
71eaa3327e Use tsconfig-paths for easier access to the source
Currently, tests only can import source code modules through relative
paths `../../`. This makes it very difficult to refactor and organize
tests in folders as the paths change.

[tsconfig-paths](https://www.npmjs.com/package/tsconfig-paths) allows to
reference the source through an alias defined in the "paths" section of
tsconfig.json
2022-08-18 12:23:31 -04:00
Felipe Lalanne
9846fa64c7 Update tsconfig.json to use es2019 2021-11-16 16:40:15 -03:00
Pagan Gazzard
2ae22b4fbd Enable strict options by default and only disable specific ones
Change-type: patch
2021-03-22 13:29:53 +00:00
Cameron Diver
826eec2e4f 🚀 Update supervisor to node12
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-04-13 14:36:59 +01:00
Pagan Gazzard
fd4cec31e7 Convert test/12-logger.spec.coffee to javascript
Change-type: patch
2020-03-31 16:25:57 +01: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
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
019190646e Update pinejs-client to pinejs-client-request 5.x
Change-type: patch
2018-12-19 17:54:53 +00:00
Pagan Gazzard
2a17184d32 Let typescript do the json resolution so we get proper types
Change-type: patch
2018-11-06 18:13:52 +00:00
Cameron Diver
892d227cc2
compose/service: Convert module to typescript and add network config
Stability improvements;
* Printing of unsupported compose fields
* Added a lot of tests
* All compose configuration has a default value, enabling better
comparison

Change-type: minor
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-09-21 10:30:27 +01:00
Cameron Diver
0c2c566da8
fix: Add es2015 lib to tsconfig.json
Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-09-03 09:43:14 -07:00
Cameron Diver
1060e70e82
dev: Add package.json tasks to aid debugging supervisor tests
Running mocha on the coffee and ts sources resulted in unreliable
sourcemaps, and breakpoints not working, among other things. To solve
this, this commit adds package.json tasks which will build both the
coffeescript and typescript files with their sourcemaps and places it
into a build directory. It also copies over other dependent files, such
as test data and migrations.

Another task adds a mocha debugging command, which can be connected to
using a node debugger.

Another tasks runs mocha without a debugging interface, but also without
running linters etc first. This enables the tests to be run much faster.

Change-type: minor
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-08-16 16:38:40 +01: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