mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #1422] [MERGED] Better JS language integration for Pre-Request scripts and Test scripts #3301
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#3301
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/1422
Author: @AndrewBastin
Created: 1/9/2021
Status: ✅ Merged
Merged: 1/22/2021
Merged by: @liyasthomas
Base:
main← Head:feat/js-integrations📝 Commits (10+)
37fd085Add tern as dependencyfebd15fAdd build rule to transpile mjsad5d135Initial implementation of the auto complete engine157e91fSeparate out the tern server code to separate fileb839b60Added extra type defs for tern server0d78394Boost the pw completion result to the top of the listce87498Added acorn and acorn-walk as dependencyc39cda7Semantic linting powered by terne745a2aMerge branch 'main' into feat/js-integrationsd0e494dFix DeepCode warnings for js-editor📊 Changes
11 files changed (+2434 additions, -36 deletions)
View changed files
📝
components/ui/js-editor.vue(+139 -30)➕
helpers/tern.js(+119 -0)➕
helpers/terndoc/ecma.json(+1284 -0)➕
helpers/terndoc/pw-extras.json(+51 -0)➕
helpers/terndoc/pw-pre.json(+8 -0)➕
helpers/terndoc/pw-test.json(+24 -0)➕
helpers/ternlint.js(+672 -0)📝
nuxt.config.js(+6 -0)📝
package-lock.json(+126 -6)📝
package.json(+3 -0)📝
pages/index.vue(+2 -0)📄 Description
This PR intends to bring better JS integration features to the Pre-Request and Test script editors in Hoppscotch.
With current implementation, we only have basic syntax linting powered by Esprima.
The new proposed implementation hopes to bring the following changes:
consoleobject is proposed to be still accessible still though)Progress
and retire Esprima(we are gonna keep esprima around for now)Restricting usage of browser APIs(delayed, will be transitioned slowly over time)Happy Hacking!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.