Commit Graph

27 Commits

Author SHA1 Message Date
Hetu Nandu
39b0a4e5a6
feat: Native promises support in Appsmith (#8988)
Co-authored-by: Apeksha Bhosale <7846888+ApekshaBhosale@users.noreply.github.com>
2021-12-23 14:17:20 +00:00
Anand Srinivasan
3a4658c8f5
fix: unexpected return error (#9432)
* assign undefined for empty scripts during evaluation

* add unit tests

* handle anonymous_function when undefined

* update unit tests

* remove unwanted assignments in evaluation scripts

* update unit tests

* Update app/client/src/workers/evaluate.test.ts

* fix lint cypress tests

* remove semicolon

* fix API_bugs_spec

* undo anonymous function change

* Update app/client/src/workers/evaluate.ts

Co-authored-by: Hetu Nandu <hetunandu@gmail.com>

* add comment

* return back when JS is empty

* Update app/client/src/workers/evaluate.ts

Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
Co-authored-by: Arpit Mohan <arpit@appsmith.com>
2021-12-21 20:00:19 +05:30
Hetu Nandu
4c54ea21fb
feat: Add support for custom 'this' and 'global' variables during evaluation (#9651) 2021-12-14 14:00:43 +05:30
Anand Srinivasan
4ced0954db
feat: Syntax parsing through AST (#9115)
* ast changes

* ast fix for cyclic dependency

* jest test updates for ast

* feat: Extract references in code with AST (#8617)

Co-authored-by: Nidhi <nidhi@appsmith.com>

* undo debugger changes

* code clean up and comments

* update type checks for literal nodes

* include tests for IIFE and direct object access

* fix - dependency map not updated on IIFE/direct object access

* update tslib

* unescape on AST parsing

Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
Co-authored-by: Nidhi <nidhi@appsmith.com>
2021-12-02 15:33:43 +05:30
arunvjn
a9cf962b74
fix: evaluation of escaped characters (#8796) 2021-11-10 12:41:23 +05:30
Apeksha Bhosale
c0e945f0a3
in case if empty eval tree (#8441) 2021-10-12 15:49:10 +05:30
Hetu Nandu
2c3a0991f7
feat: setInterval and clearInterval support (#8158) 2021-10-11 12:55:03 +00:00
Vinod
159e7f2062
fix: issue with string templates (#7848)
* Remove bracket highlight on error

* fix string template issue

* using string template to join strings

* fix breaking tests
2021-10-07 12:33:15 +00:00
Hetu Nandu
94e3ffef67
feat: Linting in trigger fields (#7638) 2021-10-05 13:52:27 +00:00
Hetu Nandu
79aefc4d74
hotfix: js action parsing error resolution (#8086) 2021-10-01 22:40:49 +05:30
Vinod
f3b281092b
fix: copy icon in evaluated popup and dot notation jshint error (#7639)
* Remove bracket highlight on error

* remove dot notation rule and change copy icon

* fix #7582
2021-09-22 07:05:02 +00:00
Apeksha Bhosale
386e788e28
fix: pushing and removing errors from debugger for js object (#7465)
* pushing and removing errors from debugger for js object

* added message part of messages

* changes for linting and errors showing

* added try catch for executing function

* PR comments fixed

* PR comment fixed
2021-09-21 11:32:45 +05:30
Vinod
2bd324a5aa
feat: address few bug with linting and improve highlighting (#7287)
* show lint errors as warnings

* add initial code

* adjust editor positions

* update pr comments

* mark jshint errors

* reset changes

* remove unused prop

* fix test errors

* remove unused imports

* dont show warning in the error counter

* show yellow if warning

* remove active error functionality

* update linter to use async functionality

* update linter messages

* update binding positions

* fix evaluate tests

* dont show undefined errors in debugger

* move lint code to separate file

* update testes

* remove unused import

* update tests

* address pr comments

* add comment to explain why

* replace proper regex

* fix undefined message error

* Update styling for warnings

* address position issue in the linter

* Fix failing tests

* Merge 'release' on to  'Feature/linting-errors'

* add console as global object

* address lint issues

* fix requested linting erros for release

* fix breaking issue

* remove unwanted code

* revert unrelated changes

* remove unnecessary file

* add extra libraries to jshint data

* import lodash functions that are used

* update jshint settings

* Fix failing test

* don't show lint errors if there is a parsing issue

* update jshint to latest version
2021-09-17 16:01:45 +05:30
Apeksha Bhosale
09eea59330
feat: JS Editor (#6003)
* Changes to add js plugin

* routes+reducer+create template

* added debugger to js editor page

* entity explorer changes

* create js function

* added copy, move and delete action

* added js plugin

* added existing js functions to data tree

* removed actionconfig for js collection

* new js function added to data tree and entity as well

* parsing flow added

* changes to data tree

* parse and update js functions

* small changes for def creator for js action

* create delete modified

* small changes for update

* update flow change

* entity properties added

* removed linting errors

* small changes in entity explorer

* changes for update

* move, copy implementation

* conflict resolved

* changes for dependecy map creation

* Only make the variables the binding paths

* Basic eval sync working

* Minor fixes

* removed unwanted code

* entity props and autocomplete

* saving in progress show

* redirection fix after delete js action

* removed unnecessary line

* Fixing merge conflict

* added sample body

* removed dummy data and added plugin Type

* few PR comments fixed

* automplete fix

* few more PR comments fix

* PR commnets fix

* move and copy api change

* js colleciton name refactor & 'move to page' changes & search

* view changes

* autocomplete added for js collections

* removing till async is implemented

* small changes

* separate js pane response view

* Executing functions

* js collection to js objects

* entity explorer issue and resolve action on page switch

* removed unused line

* small color fix

* js file icon added

* added js action to property pane

* Property pane changes for actions

* property pane changes for js functions

* showing syntax error for now

* actions sorted in response tab

* added js objects to slash and recent entitties

* enabling this to be used inside of function

* eval fix

* feature flag changes for entity explorer and property pane

* debugger changes

* copy bug fix

* small changes for eval

* debugger bug fix

* chnaged any to specific types

* error in console fix

* icons update

* fixed test case

* test case fix

* non empty check for functions

* evaluate test case fix

* added new icons

* text change

* updated time for debounce for trial

* after release mereg

* changed icon

* after merge

* PR comments simple

* fixed PR comments - redux form, settings remove

* js object interface changes

* name refactor

* export default change

* delete resolve actions chnage

* after merge

* adding execute fn as 3rd option and removed create new js function

* issue 7054 fixed - app crash

* execute function on response tab changes

* refactor function name part 1

* refactor of js function name

* try catch added refactor

* test fix

* not used line removed

* test cases locator fixed

Co-authored-by: Nidhi <nidhi.nair93@gmail.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
2021-09-08 23:02:22 +05:30
Hetu Nandu
3380227cbb
feat: Enable Promises in Appsmith (#6253) 2021-08-27 14:55:28 +05:30
Vinod
9f3a24fbb0
feat: show lint errors in code editor (#6265) 2021-08-26 10:15:17 +05:30
Hetu Nandu
8789c4f897
Fix JS error message showing callstack in firefox (#6234) 2021-07-29 17:06:49 +05:30
Hetu Nandu
a5187aadd5
Revert back to old way of eval (#5851)
This change was introduced in #4446 and #5034
2021-07-15 10:29:04 +05:30
hetunandu
dcfb8f6e48 Revert "Revert back to old way of eval"
This reverts commit ca54f9f21b.
2021-07-14 16:19:01 +05:30
hetunandu
ca54f9f21b Revert back to old way of eval 2021-07-14 16:18:28 +05:30
Hetu Nandu
52311e8944
Only add appsmith functions in global scope during trigger evaluation (#5760) 2021-07-13 18:27:59 +05:30
Hetu Nandu
83af4d372d
Fix top level parallel runs (#5613) 2021-07-07 15:29:44 +05:30
Hetu Nandu
dce3a80e40
Minor fixes for errors (#5361) 2021-06-23 18:55:18 +05:30
Hetu Nandu
441f42c72f
Generate linting errors via JSHint (#5034) 2021-06-21 16:39:51 +05:30
Hetu Nandu
8c84dcfdec
Fix multiline js issues (#4816) 2021-06-02 18:27:27 +05:30
Hetu Nandu
aac5fcb6c7
Use the Function constructor for user script eval (#4446)
Co-authored-by: Arpit Mohan <arpit@appsmith.com>
2021-05-20 12:31:10 +05:30
Hetu Nandu
89effdd2fb
Refactor evaluate function and add tests (#3536) 2021-03-13 19:42:21 +05:30