Commit graph

14 commits

Author SHA1 Message Date
FloVanGH
fe596179da
node: added fileloader to LoadData. (#6530) 2024-10-14 07:33:42 +02:00
FloVanGH
499a522f99
node: better ergonomics for structs and enums (#6500) 2024-10-10 04:12:32 +00:00
FloVanGH
25ae55b5dd
Improve source structure in the node api (#6164)
* Update api/node/typescript/models.ts

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

* Code review feedback
---------

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2024-09-30 08:49:35 +00:00
Nigel Breslaw
b36a66e405
Enable more js/tsc biome rules
noUselessConstructor
useNodejsImportProtocol
noImplicitAnyLet
2024-09-13 10:04:39 +02:00
Nigel Breslaw
2bee820ccf
Start to enable default javscript/typescript lint rules
This enables the recommended rules useConst and useImportType
2024-09-12 16:08:52 +02:00
FloVanGH
e79dcc4bec
Use same vscode-ext lint and format also for api/node (#6039)
* Use vscode ext lint and format also for api/node
* Re-use biome config file from VS code instead of duplicating it
* Remove package-lock.json again
* Don't bother running the biome formatter on Windows

---------

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2024-09-09 09:22:33 +02:00
Bedis Nbiba
62c55dd188
js: show diagnostics when erroring (#5651)
before
```
error: Uncaught (in promise) Error: Could not compile ui/appwindow.slint
    at loadSlint (file:///home/mrcool/.cache/deno/npm/registry.npmjs.org/slint-ui/1.7.0/index.js:464:19)
    at Module.loadFile (file:///home/mrcool/.cache/deno/npm/registry.npmjs.org/slint-ui/1.7.0/index.js:644:12)
    at file:///home/mrcool/dev/deno/lab/memory/src/main.ts:3:23
```

after
```
error: Uncaught (in promise) Error: Could not compile ui/appwindow.slint
Diagnostics:
[ui/appwindow.slint:4:5] Unknown type MemoryTile
    at loadSlint (file:///home/mrcool/.cache/deno/npm/registry.npmjs.org/slint-ui/1.7.0/index.js:468:19)
    at Module.loadFile (file:///home/mrcool/.cache/deno/npm/registry.npmjs.org/slint-ui/1.7.0/index.js:648:12)
    at file:///home/mrcool/dev/deno/lab/memory/src/main.ts:3:23
```
2024-07-19 16:58:56 +02:00
Aurindam Jana
3523e86359
Simplify commercial license (#3063)
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license (#5257)
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Simon Hausmann
8cf9256338 Fix failing Node.js test expectations
Adjust line numbers.

Amends 0cfeec1a31
2024-04-15 16:16:09 +02:00
Aurindam Jana
0cfeec1a31
Update Slint Community License (#4994)
Updated the version from 1.1 to 1.2 
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
2024-04-15 15:18:55 +02:00
FliPPeDround
1d643dd6c2 fix: use loadSource in loadSource api test 2023-11-22 08:11:53 +01:00
FliPPeDround
2920e15f4a feat: export loadSource api 2023-11-22 08:11:53 +01:00
Simon Hausmann
84fd6dc08c Clean up Node.js port build system
- Instead of building index.js with esbuild and generating types with
  tsc, use tsc to build index.js and index.d.ts.
- Use ts-node instead of swc for typescript based tests, as that
  works with es modules.
- Remove "syntax_check" target from package.json as that's now
  implied with "compile".
- Sadly this requires one "as any" cast as tsc somehow fails to
  determine the right type info for node-fetch.

Unfortunately index.js can't be an ES module without breaking
compatiblity. It would imply that the Node.js port can't be used with
require() anymore. So even thought that would simplify things further,
it's not part of this PR.
2023-11-21 07:20:21 +01:00
Renamed from api/node/__test__/api.spec.ts (Browse further)