Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
5fd05b6
Starting port to godot 4.0
Geequlim Aug 22, 2022
254fe19
Fix compile error for godot 4.0
Geequlim Aug 23, 2022
56016ee
Fix reference object constructor
Geequlim Aug 24, 2022
bb7a344
Improve RefCounted binding
Geequlim Aug 25, 2022
39421ba
Rename ECMAScript to JavaScript for godot 4
Geequlim Sep 2, 2022
98f6b3b
Fix compile error with non-editor build
Geequlim Sep 2, 2022
7c68bbe
Implement JavaScriptCallable for Signal & slot
Geequlim Sep 9, 2022
fbc40b6
Implement script workflow
Geequlim Sep 23, 2022
19b54c1
fix typo
Geequlim Sep 23, 2022
c21426e
[FIX] Failsafe env["TOOLS"] variable getter
why-try313 Feb 21, 2023
3314963
[FIX] Fixed missing comma
why-try313 Feb 21, 2023
1216d8d
[FIX] Adds GDNative to GDExtension migration changes
why-try313 Feb 21, 2023
9b16953
[FIX] Adds missing get_global_name method
why-try313 Feb 21, 2023
5cc9c4c
Merge pull request #148 from why-try313/gd4
Geequlim Mar 9, 2023
6bcd1fa
Updated JavaScript modules for Godot 4.0 branch
animanmaster Mar 15, 2023
2c325ea
Merge pull request #150 from V-Sekai/gd4
Geequlim Apr 23, 2023
783517a
Update README.md
ogrotten Oct 21, 2022
01457b9
Fix Godot 4.0 compile errors, update JavaScript integration, refactor…
fire Apr 23, 2023
398a108
Update generate_builtin_api.py, javascript.cpp, javascript.h, and 13 …
fire Jun 15, 2023
847fe10
Remove build_github_actions.py
fire Jun 15, 2023
caa8840
Update godot-javascript to better pass tests.
fire Jun 15, 2023
3f6a3b4
Remove pthread library and run format.
fire Jun 15, 2023
e547560
Format binding generator.
fire Jun 15, 2023
7655597
Apply formatting.
fire Jun 15, 2023
53f4051
Apply python formatting.
fire Jun 15, 2023
bcaa414
Add a condition to avoid building javascript on msvc.
fire Jun 15, 2023
e3e97ba
Disable unit tests.
fire Jun 15, 2023
4dad363
Remove c++ version check.
fire Jun 15, 2023
537e2b4
Avoid extras.
fire Jun 15, 2023
5261a4f
Only build windows and linux.
fire Jun 15, 2023
1c75361
Move versions back to 4.0.
fire Jun 18, 2023
9dabb22
Fix error in includes.
fire Jun 18, 2023
b87a29e
git subrepo pull (merge) modules/javascript
fire Jun 18, 2023
f430ed2
Handle cases that aren't supported.
fire Jun 18, 2023
f6687c5
git subrepo pull (merge) modules/javascript
fire Jun 18, 2023
245f8d0
Update scons.
fire Jun 18, 2023
166c796
Force a tag.
fire Jun 19, 2023
087e244
git subrepo pull (merge) modules/javascript
fire Jun 19, 2023
17caa75
Switch to match master.
fire Jun 19, 2023
23ba457
Update build scripts.
fire Jun 19, 2023
0919fc3
Add pthread for mingw.
fire Jun 19, 2023
78dbf97
If use mingw, use pthread.
fire Jun 19, 2023
eca30e6
Restore file format.
fire Jun 19, 2023
a91c1f4
Restore header guards too.
fire Jun 19, 2023
fdd5180
Fix include guards style.
fire Jun 19, 2023
8d976e4
Restore black format.
fire Jun 19, 2023
f4bc581
Restore all the scripts.
fire Jun 19, 2023
48305ba
Add python build.
fire Jun 19, 2023
01abd78
Remove python tests.
fire Jun 19, 2023
f648c5b
Disabled a few builds.
fire Jun 19, 2023
5b66370
feat: add icons
jaune Aug 19, 2023
2911768
Revert "Disabled a few builds."
fire Jun 19, 2023
d3ebf68
Update XML file paths for JavaScript and JavaScriptModule classes
fire Aug 20, 2023
007e94a
Refactor JavaScript bindings and fix file paths
fire Aug 20, 2023
dfbdf57
Format SCsub.
fire Aug 20, 2023
0fe880e
Update the readme.
fire Aug 20, 2023
1bb9edf
Format black_format.sh and SCsub scripts
fire Aug 20, 2023
0b9283b
Add XML schema for class documentation
fire Aug 20, 2023
5fd3ce9
Refactor static checks workflow
fire Aug 20, 2023
d5a9cf7
Refactor static checks workflow
fire Aug 20, 2023
6177b3e
Add .clang-format and .clang-tidy configuration files
fire Aug 24, 2023
94d95b5
Apply formatting.
fire Aug 24, 2023
76692da
Apply whitespace change.
fire Aug 24, 2023
3863950
Run spell checker.
fire Aug 24, 2023
ec74bb0
Refactor platform condition in config.py
fire Aug 24, 2023
5bf37c6
Remove JavaScript style checks
fire Aug 24, 2023
71c6704
Update JSValue typedef in quickjs.h to avoid error.
fire Aug 24, 2023
8d86711
Support MSVC builds without error in Github Actions.
fire Aug 24, 2023
221e358
Fix function name and use safer string formatting in JavaScript module
fire Aug 24, 2023
d487bcf
Format python files for automated tests.
fire Aug 24, 2023
b2cacc0
Fix gitub actions tests.
fire Aug 24, 2023
c2533ae
Fix tests.
fire Aug 24, 2023
60db283
Try to pass tests.
fire Aug 24, 2023
45ca44b
Exclude mono platform
fire Aug 24, 2023
483c70d
Apply xml docs fixes for tests.
fire Aug 24, 2023
ca34e79
Merge pull request #160 from jaune/gd4-icons
fire Aug 31, 2023
7160c86
Refactor JavaScript integration and improve code readability.
fire Oct 1, 2023
7fecf15
Merge pull request #164 from nmerget/fix-gd4-rebase-2
fire Oct 1, 2023
b23b482
Merge pull request #156 from Geequlim/gd4-rebase
fire Oct 1, 2023
dc296d9
Merge branch 'master' into 4.1
fire Oct 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Run spell checker.
  • Loading branch information
fire committed Aug 24, 2023
commit 3863950f0030ac8f6db298b1c681cab35c847475
2 changes: 1 addition & 1 deletion misc/decorators.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Expose as a godot class.
* An class object is created and attached automaticly when construct an instance from this class
* An class object is created and attached automatically when construct an instance from this class
*/
export function gdclass<T extends godot.Object>(target: new() => T) {
const id = gdclass['internal_class_id'] = gdclass['internal_class_id'] ? gdclass['internal_class_id'] + 1 : 1;
Expand Down
4 changes: 2 additions & 2 deletions misc/godot.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ declare module globalThis {
*
* Workers run in another global context that is different from the current context.
*
* You can run whatever code you like inside the worker thread. All of the godot API are avaliable inside workers.
* You can run whatever code you like inside the worker thread. All of the godot API are available inside workers.
*
* Data is sent between workers and the main thread via a system of messages — both sides send their messages using the `postMessage()` method, and respond to messages via the `onmessage` event handler (the message is contained within the Message event's data attribute.) The data is copied rather than shared.
*
Expand All @@ -81,7 +81,7 @@ declare module globalThis {
/**
* Sends a message to the worker's inner scope. This accepts a single parameter, which is the data to send to the worker.
* @param message The object to deliver to the worker; this will be in the data field in the event delivered to the `onmessage` handler.
* @note The data cannot be instance of `godot.Object` or any other JavaScript object conains functions.
* @note The data cannot be instance of `godot.Object` or any other JavaScript object contains functions.
*/
postMessage(message: any): void;

Expand Down
16 changes: 8 additions & 8 deletions tests/UnitTest.js.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test('Object.prototype.connect', () => {

let obj = new godot.Object();
obj.connect('script_changed', (...args)=> {
console.log(`signal 'script_changed' emited with:`, ...args);
console.log(`signal 'script_changed' emitted with:`, ...args);
ok = true;
});
obj.emit_signal('script_changed', 123, 'hello');
Expand All @@ -39,28 +39,28 @@ test('Object.prototype.connect', () => {


// --------------------------- Unit Test Implementation ------------------------
function test(description, blcok, group = 'default') {
function test(description, block, group = 'default') {
const entries = TEST_ENTRIES.get(group) || [];
entries.push({ description, blcok });
entries.push({ description, block });
TEST_ENTRIES.set(group, entries);
}
function runEntry(entry) {
return new Promise((resolve, reject) => {
switch (typeof (entry.blcok)) {
switch (typeof (entry.block)) {
case 'boolean':
return resolve(entry.blcok);
return resolve(entry.block);
case 'function': {
try {
resolve(entry.blcok());
resolve(entry.block());
} catch (error) {
console.error(error);
resolve(false);
}
}
break;
case 'object':
if (entry.blcok instanceof Promise) {
entry.blcok.then(() => {
if (entry.block instanceof Promise) {
entry.block.then(() => {
resolve(true);
}).catch(err => {
resolve(false);
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/quickjs/quickjs_binder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ JSModuleDef *QuickJSBinder::js_module_loader(JSContext *ctx, const char *module_
module.hash = hash_var.hash();
module.module = m;
module.res = res;
module.res->reference(); // Avoid auto release as module don't release automaticly
module.res->reference(); // Avoid auto release as module don't release automatically
module.res_value = val;
module.flags = MODULE_FLAG_RESOURCE;
module.module = m;
Expand Down
2 changes: 1 addition & 1 deletion tools/editor_tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ void JavaScriptPlugin::_export_typescript_declare_file(const String &p_path) {

void JavaScriptPlugin::_export_enumeration_binding_file(const String &p_path) {
_export_typescript_declare_file("");
String file_content = "// Tool generated file DO NOT modify mannually\n"
String file_content = "// Tool generated file DO NOT modify manually\n"
"// Add this script as first autoload to your project to bind enumerations for release build of godot engine\n"
"\n"
"if (!godot.DEBUG_ENABLED) {\n"
Expand Down