Commit Graph

427 Commits

Author SHA1 Message Date
Filip Sodić
67562e32cc
Remove undefined values from query keys (#671)
* Remove undefined values from query keys

* Update e2e tests
2022-07-18 14:18:06 +02:00
Martin Sosic
a0299febbc Updated wasp version to 0.5.2.1. 2022-07-14 22:58:33 +02:00
Martin Sosic
496da79f50 Added version 0.5.2.1 to Changelog. 2022-07-14 22:57:51 +02:00
Shayne Czyzewski
d5a9039722
Work around versioned package NPM bug (#661) 2022-07-07 10:37:48 -04:00
Filip Sodić
d1bea1c513
Add task status toggling to task page in todo app (#664)
* Add task done toggling to task page

* Fix wrong condition in example todo app
2022-07-06 23:13:35 +02:00
Shayne Czyzewski
9f7d212b8c
Fix User model name assumption (#660) 2022-07-01 08:18:40 -04:00
Martin Šošić
25a1b991ef
Now waspc assumes all files to be UTF8 regardless of OS'es default locale. (#653) 2022-06-28 19:48:02 +02:00
Martin Šošić
ec032e74e6
Touched-up deployment and related instructions. (#651) 2022-06-28 13:54:55 +02:00
Martin Šošić
12c0e7b1f0
Added ./run cmd + README section for accepting e2e test changes. (#644) 2022-06-23 20:09:21 +02:00
Martin Sosic
90571c0298 Updated wasp version to 0.5.2.0. 2022-06-23 14:19:43 +02:00
Martin Šošić
4f22ea1c08
Updated Prisma to 3.15.2. Fixes #629. (#643) 2022-06-23 14:18:13 +02:00
Martin Sosic
2a1fae3ecd Updated CHANGELOG for v0.5.1.0. 2022-06-17 17:24:19 +02:00
Martin Sosic
a3acc62f74 Updated wasp version to 0.5.1.0. 2022-06-17 17:08:29 +02:00
Martin Šošić
62f0a76937
Limited Wasp version to ^16.0.0 && <=16.15.0 (#634)
* Limited Wasp node version to ^16.0.0 && <=16.15.0.

In the process, I removed .nvmrc files from generated code and
refactored SemanticVersion to follow npm spec.
I also updated CI to use node 16.15.0, and not any 16.
I also updated docs.
2022-06-17 17:02:54 +02:00
Filip Sodić
fdd8e47b25
Reduce duplication when creating frontend queries and actions (#633)
* Make waspc/todoApp return tasks in consistent order

(cherry picked from commit 57606c74e4)

* Reduce duplication in frontend actions and queries

* Fix formatting

* Update e2e tests to include queries/core
2022-06-17 14:35:01 +02:00
Filip Sodić
5e5b264448
Make waspc/todoApp return tasks in consistent order (#632)
(cherry picked from commit 57606c74e4)
2022-06-16 14:50:02 +02:00
Filip Sodić
0b78f658be
Implement support for query client configuration (#612)
* Implement support for query client configuration

* Make sure query client is always initialized

* Fix formatting

* Fix formatting

* Add missing await in index.js

* Separate query client setup into two functions

* Introduce default query client config

* Fix missing export in docs

* Fix missing field warnings

* Add query client setup docs

* Update e2e tests for query client config
2022-06-09 10:37:19 +02:00
Shayne Czyzewski
4d57213e18
Move react-error-overlay into dependencies (#626)
* Move react-error-overlay to dependencies

* fix e2e

Co-authored-by: shayneczyzewski <shayne.czyzewski@gmail.com>
2022-06-07 18:35:52 +02:00
Shayne Czyzewski
d5a0e322d4
Fix unresponsive UI on server reload (#621) 2022-06-03 16:38:21 -04:00
Shayne Czyzewski
a264d2ee29
Make warnings filterable to avoid redundant messages (#610) 2022-06-02 14:04:57 -04:00
Modotte
f8c775923d
Modularize Lexer.x (#599)
* Modularize Lexer.x

Extract utility functions from Lexer.x into a separate file.

* Move more utilities out of Lexer.x

* Fix hlint and ormolu warnings
2022-05-24 17:57:05 +02:00
Filip Sodić
59c714111e
Support for the client setup function (#595)
* Add clientSetup support to analyzer and tidy up generator

* Add clientSetup support to generator

* Add tests for client setup function and tidy up

* Address PR comments for client setup function

* Clean up server and web app generators

* Document react query invalidation on logout

* Update e2e tests after query client cache clean

* Fix syntax error in exmaple app

* Remove leftover todos

* Fix formatting

* Fix formatting

* Fix tests for client setup function

* Update e2e test

* Fix todos in templates

* Add docs for client setup

* Fix docs typo

* Fix docs typo

* Fix docs typo

* Fix docs typo

* Update e2e test
2022-05-20 14:49:26 +02:00
Martin Sosic
a6f5a7d7b2 Updated wasp version to 0.5.0.0. 2022-05-18 12:55:22 +02:00
Martin Sosic
cda64a3d46 Added v0.5 to the CHANGELOG. 2022-05-18 12:54:42 +02:00
Shayne Czyzewski
4de7d16331
Adds cron support to pg-boss Jobs and documentation (#586) 2022-05-13 12:30:55 -04:00
Shayne Czyzewski
f14be11fc3
Add pg-boss as a Job executor (#582)
Note: This does not provide cron support, that is coming in the next PR.
2022-05-03 14:34:25 -04:00
Shayne Czyzewski
a5f86524e0
Changes python to python3 in Dockerfile (#577) 2022-04-21 08:33:49 -04:00
Martin Šošić
4ee7cebc36
Context and user id can now be passed to our telemetry. (#564)
* Added 'context' field to our telemetry, specifically to recognize when Wasp is running on Gitpod.

* Telemetry user id can now be specified via ENV var.

* Improved user signature obtaining code a bit.

* Added fromMaybeM.
2022-04-15 18:46:47 +02:00
Filip Sodić
50d806daa6
Update React Query to v3 (#554)
* Apply minor syntax fixes to templates

* Fix Wasp react app warnings

* Fix small bug in waspc todo app

* Rearrange functions in RouterGenerator

* Migrate react-query to v3

* Collapse config in react query

* Update e2e tests after react-query migration

* Rename function in RouterGenerator

* Update job tests
2022-04-15 11:23:15 +02:00
Shayne Czyzewski
43043708b3
Adds output for new Job golden test. (#557) 2022-04-13 12:46:51 -04:00
Shayne Czyzewski
adcb15a41c
Adds a simple pass-through Jobs implementation. (#553) 2022-04-13 12:30:29 -04:00
Martin Sosic
801ba69e54 Increased resolution of module graph produced by run script. 2022-04-13 14:19:17 +02:00
Phil de Joux
45a1ffd5c5
Change NOTE to a warning. (#552) 2022-04-06 21:09:33 +02:00
Shayne Czyzewski
302fcc11d8
Adds support for basic Wasp job DSL parsing (#540) 2022-04-06 10:07:45 -04:00
Phil de Joux
f9008e81bf
Add a warning in the project file to run cabal update. (#526) 2022-04-06 15:10:11 +02:00
Shayne Czyzewski
f91dbdc6fa
Change termination method of spawned processes on *nix (#524) 2022-03-31 11:55:42 -04:00
Filip Sodić
b3d9014e37
Allow Wasp identifiers for project names (#520)
* Allow Wasp identifiers for project names

* Rename initialState to makeInitialState

* Fix formatting

* Use parser to parse Wasp identifiers

* Add newline at the end of Wasp.Analyzer.Parser

* Fix newline at the end of Wasp.Analyzer.Parser

* Clean up and rename parsing

* Fix newline at the end of Wasp.Analyzer.Parser

* Add tests for new parser functions

* Fix formatting

* Fix formatting

* Reformat where statement

* Address PR comments and remove redundant module

* Remove keywords from error message

* Fix formatting in CreateNewProject.hs

* Remove redundant note on duplication
2022-03-30 01:25:56 +02:00
Shayne Czyzewski
52ec8d7232
Improve performance of writing FileDrafts (#506)
Closes #503 

Co-authored-by: Martijn Faassen <martijn@wasp-lang.dev>
2022-03-29 08:53:28 -04:00
Shayne Czyzewski
31b01838ae
Add missing react-app data-files (#529)
Co-authored-by: shayneczyzewski <shayne.czyzewski@gmail.com>
2022-03-28 19:26:37 +02:00
Shayne Czyzewski
a4a2b03a81
Swap cabal freeze file for index-state (#519) 2022-03-24 08:50:14 -04:00
Filip Sodić
52badd651e
[Analyzer] Reverse the order of Wasp error messages (#500)
* Reverse the order for TypeError messages

* Remove redundant import and unused pragma

* Remove redundant import and unused pragma

* Reverse additional type error messages

* Remove redundant import

* Format util test file

* Address PR comments

* Add empty line to TypeError.hs

* Address PR comments

* Format TypeError.hs

* Reverse message order in evaluation errors

* Extract common error message functions

* Add tests for EvaluationErrors

* Improve naming in Wasp.ErrorMessage

* Fix formatting

* Fix formatting

* Format code

* Change naming and syntax in ErrorMessage

* hange names in EvaluationError tests

* Add full stops to documentation

* Fix formatting in tests
2022-03-23 13:18:43 +01:00
Shayne Czyzewski
1995ccdb9d
Make CLI code testable (#510) 2022-03-23 08:04:09 -04:00
Phil de Joux
318eb03294
Edit of setup section around ghcup and with-compiler. (#511) 2022-03-22 15:19:22 +01:00
Filip Sodić
8a3fba8831
Require LTS version of Node for Wasp (#504)
* Require LTS node and npm on client and server

* Update node and npm versions in the docs

* Add npmrc and nvmrc to WebAppGenerator

* Change function name in test

* Add newline to nvmrc

* Add newline to Common.hs

* Remove extra empty line in nvmrc

* Remove extra empty line in Common.hs

* Update end to end tests for node LTS

* Add newline at the end of server/nvmrc

* Ensure Node version 16 in CI

* Fix broken ci file

* Change how Wasp specifies required versions

* Fix formatting

* Use type alias for semantic versions

* Remove incorrect comment on Prisma LTS

* Update e2e checksums

* Fix typo in gitignore

Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>

* Sort e2e checksums

* Extract semantic version to its module

* Fix formatting

* Fix formatting again

* Add comment explaining nvmrc

* Add tests and change semver naming

* Add natural numbers and formatting to semver

* Add newline at the end of semver module

* Add missing space to node mismatch message

Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
2022-03-21 15:00:19 +01:00
Phil de Joux
790a9b609e
Remove duplicate hlint ignore. (#514) 2022-03-18 12:46:11 +01:00
Martin Sosic
e40c664e20 Removed leftover package.yaml. 2022-03-18 12:43:02 +01:00
Phil de Joux
08704f4117
Follow hlint suggestions. (#513) 2022-03-18 12:33:37 +01:00
Martin Sosic
7865110085 Constrained versions of dev tools (ormolu, hlint, stan). 2022-03-17 17:58:30 +01:00
Martin Šošić
da8d3a1d85
Check in CI that cabal freeze file is up to date. (#508) 2022-03-17 14:22:58 +01:00
Martin Sosic
27a22fcf3e Added command to ./run for printing module graph of our code. 2022-03-17 14:20:59 +01:00
Martin Šošić
2a16bfd3cf
App spec validation (#459) 2022-03-17 12:36:36 +01:00
Martin Sosic
ac0567fa6a Added some more info about how we parallelize cabal compilation. 2022-03-16 22:27:35 +01:00
Martin Šošić
857912c2cc
Migrated Wasp from Stack to Cabal (#471)
Co-authored-by: shayneczyzewski <shayne.czyzewski@gmail.com>
2022-03-16 16:00:18 +01:00
Shayne Czyzewski
038ae0132f
Ensure .waspchecksums file is sorted (#507) 2022-03-15 20:51:50 -04:00
Shayne Czyzewski
8bc004ef29
Makes Wasp smarter when writing over existing generated files (#486)
Closes #209
2022-03-15 07:43:52 -04:00
Filip Sodić
5c6c10dc46
Add function definition rules to code style guide (#502) 2022-03-10 17:57:10 +01:00
Martijn Faassen
b6f738416a
Use send message protocol in cli (#493)
Use cliSendMessage everywhere in CLI

Instead of using waspSays and friends, we use the new cliSendMessage protocol everywhere to
send messages. For convenience we introduce a cliSendMessageC that's lifted to commands.

We handle CommandErrors specially now, and have a special way to display errors (failures) and warnings
with a heading.
2022-03-09 15:43:41 +01:00
Shayne Czyzewski
f68c2d5a8b
Remove python2 dependency from e2e and update README (#497) 2022-03-09 07:46:41 -05:00
Shayne Czyzewski
f24ed0d347
Fixes database setup message type (#488) 2022-03-04 15:38:07 -05:00
Shayne Czyzewski
4ecc46eab3
Adds golden output dirs for E2E testing (Part 2) (#475) 2022-03-01 15:42:31 -05:00
Shayne Czyzewski
84821005f4
Adds E2E CLI testing support via Golden Tests (Part 1) (#470) 2022-03-01 15:00:51 -05:00
Martin Šošić
8c3f60a617
Added instructions to publish docs on new release. 2022-03-01 12:05:45 +01:00
Shayne Czyzewski
9d060d7428
Check for main branch in new-release script (#476) 2022-02-25 07:40:28 -05:00
Martijn Faassen
f944f0beb3
Send messages from the setup phase (#472)
We introduce a SendMessage protocol. 

We implement it in the CLI as that knows how to send messages. We also pass it into the generator so that it can reach the setup phase. There we use it to emit messages on the CLI.
2022-02-24 12:20:37 +01:00
Shayne Czyzewski
22cdd5b70a
Added release process notes to README (#474) 2022-02-23 13:59:56 -05:00
shayneczyzewski
c1bf9bff4a Updated wasp version to 0.4.0.0. 2022-02-23 11:19:45 -05:00
Shayne Czyzewski
4bf9cc93e3
Added CHANGELOG entry for 0.4.0.0 (#473) 2022-02-23 08:21:40 -05:00
Martin Sosic
600e4eace6 Added a bit on TODO/NOTE in code style guide. 2022-02-22 18:37:43 +01:00
Martin Sosic
16632fb74c Added code style guide to waspc/README.md. 2022-02-22 17:57:14 +01:00
Martijn Faassen
540a4d0ded
Do npm install as part of generation process, only when needed (#464)
Create a seperate runSetup function

This does the `npm install` (if required) and the database setup.

Since this is now happening in the generation phase, this means we don't need
`compileAndSetup` anymore.

Since compile now sets up the dependencies, we only need to compile in any db command

Reworked the naming and types of combining the various dependencies.
2022-02-18 17:23:14 +01:00
Martijn Faassen
2b050fb9c7 Fix error handling bug
Errors were not properly handled as `error` was not bound
2022-02-16 18:42:11 +01:00
Shayne Czyzewski
09a72a7e1a
Upgrade Prisma to version 3.9.1 (#452) 2022-02-11 17:55:41 -05:00
Martijn Faassen
830bb43be1 We can compare PackageJsonDependencies independent of dependency order
Use an explicit Ord to enforce dependencies are compared by name.
2022-02-11 11:05:02 +01:00
Martijn Faassen
27b3c83f7a Introduce combinePackageDependencies
This is the base operation used now to combine package dependencies. It
knows about dev dependencies too. I've adjusted the code for
both web app and server to use this.

I've factored out commonalities in error handling into PackageJsonGenerator

We now support devDependencies for web app and in the deps command

We also have nicer functions to generate the package json entries
directly from the PackageJsonDependencies structure
2022-02-11 11:05:02 +01:00
Shayne Czyzewski
f0ec477dbd
fix: error when running prisma generate without entities (#457) 2022-02-10 07:24:50 -05:00
Martijn Faassen
55d9e1bbd8
Resolve dependencies refactor (#449)
Create a new resolveDependencies

Use Map to do differences between Wasp and user package.json dependencies.

This is now used internally in resolveNpmDeps.

Also fixes a bug in the conflict error message, where the wasp and user dependency
were previously not properly distinguished.

Add .vscode and move everything that appears text editor related to a section
2022-02-09 14:02:19 +01:00
Martijn Faassen
8a97732c71
Merge pull request #450 from wasp-lang/269-compile-and-npm-install
269 compile and npm install
2022-02-08 17:12:53 +01:00
Martin Sosic
a0b7477d19 Renamed all references to master branch into main branch. 2022-02-08 15:34:32 +01:00
Martijn Faassen
91a40a6105 Revert to the previous behavior for now.
Leave comments in place on what to do once we can skip `npm install`.
2022-02-08 11:00:24 +01:00
Shayne Czyzewski
2ccc0408c4
Adds Prisma client generation during app generation (#444)
Closes #427
2022-02-07 15:09:22 -05:00
Martijn Faassen
55d9bd1ef1 We now run compile and install each time the wasp file changes 2022-02-07 12:56:46 +01:00
Martijn Faassen
988929fbdc Factor out this function into its own module
We also need to reuse it during watch
2022-02-07 12:56:41 +01:00
Martijn Faassen
ae5f498b65 Rename to compileAndSetup
Until (and if) we ever rename setup, we should use this simpler name.

And it involves npm install of two projects, not one one anyway.
2022-02-07 12:55:24 +01:00
Martijn Faassen
4f1088ddf5 Remove commented out code 2022-02-07 12:55:24 +01:00
Martijn Faassen
901a9b9f0e Factor out a compileAndInstall 2022-02-07 12:55:24 +01:00
Martijn Faassen
a93269c88a Add .vscode local config to gitignore 2022-02-07 12:55:24 +01:00
Martin Sosic
2e9c9c63e1 Updated wasp version to 0.3.0.0. 2022-02-04 11:52:30 +01:00
Martin Sosic
f59b432269 Added CHANGELOG entry for 0.3.0.0 version, added simple error when 'app' is missing. 2022-02-04 11:51:58 +01:00
Shayne Czyzewski
c2f9eff3b8
fix: todo example error from missing entity (#446)
Co-authored-by: shayneczyzewski <shayne.czyzewski@gmail.com>
2022-02-02 19:38:47 +01:00
Martijn Faassen
cb33f2d545 When we build, do not generate .env 2022-01-31 14:09:07 +01:00
Shayne Czyzewski
c516113f11
feat: Warns user if Prisma needs to be migrated because of schema.prisma changes (#424)
Closes #214
2022-01-27 15:14:29 -05:00
Shayne Czyzewski
82cb481c96
feat: Adds Generator monad for more flexible error and warning handling (#433)
Closes #123
2022-01-23 09:21:31 -05:00
Martin Šošić
8d2c33ab28
Replace Wasp with AppSpec and Parser with Analyzer. (#423) 2022-01-20 11:45:14 +01:00
Shayne Czyzewski
b74eb88ff0
Makes DbGenerator responsible for movement of migrations dir (#420)
Closes #105
2022-01-12 11:28:21 -05:00
Martin Šošić
fe915158d9
Polished AppSpec: added missing fields + deps are not tuples. (#417) 2022-01-11 13:59:13 +01:00
Martin Šošić
5f534f7bcf
Added concept of SourceRegion to Ctx. (#409) 2022-01-08 23:55:52 +01:00
Martin Šošić
424def31d6
TypeError now uses WithCtx internally. (#408) 2022-01-08 23:54:32 +01:00
Martin Šošić
7a0f75b539
Enriched Evaluation errors with parse context + made them showable. (#407) 2022-01-08 23:52:26 +01:00
Martin Šošić
82bec83769
Better type error messages (and context). (#400)
- Enriched Parser.AST, TypeChecker.AST and TypeError with Ctx.
2022-01-08 23:50:48 +01:00
Shayne Czyzewski
cdee0ff0d3
feature: Makes CLI output easier to see success and failure (#418)
Closes #212
2022-01-05 09:15:38 -05:00