Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

View File

@ -0,0 +1,18 @@
'use strict';
require('../../common');
const vm = require('vm');
console.error('beginning');
// Regression test for https://github.com/nodejs/node/issues/7397:
// vm.runInThisContext() should not print out anything to stderr by itself.
try {
vm.runInThisContext(`throw ({
name: 'MyCustomError',
message: 'This is a custom message'
})`, { filename: 'test.vm' });
} catch (e) {
console.error('received error', e.name);
}
console.error('end');

View File

@ -0,0 +1,3 @@
beginning
received error MyCustomError
end

View File

@ -0,0 +1,38 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
require('../../common');
Error.stackTraceLimit = 4;
const vm = require('vm');
console.error('beginning');
try {
vm.runInThisContext('throw new Error("boo!")', { filename: 'test.vm' });
} catch (err) {
console.error(err);
}
vm.runInThisContext('throw new Error("spooky!")', { filename: 'test.vm' });
console.error('end');

View File

@ -0,0 +1,21 @@
beginning
test.vm:1
throw new Error("boo!")
^
Error: boo!
at test.vm:1:7
at Script.runInThisContext (node:vm:*)
at Object.runInThisContext (node:vm:*)
at Object.<anonymous> (*fixtures*vm*vm_display_runtime_error.js:31:6)
test.vm:1
throw new Error("spooky!")
^
Error: spooky!
at test.vm:1:7
at Script.runInThisContext (node:vm:*)
at Object.runInThisContext (node:vm:*)
at Object.<anonymous> (*fixtures*vm*vm_display_runtime_error.js:36:4)
Node.js *

View File

@ -0,0 +1,38 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
require('../../common');
Error.stackTraceLimit = 4;
const vm = require('vm');
console.error('beginning');
try {
vm.runInThisContext('var 4;', { filename: 'foo.vm', displayErrors: true });
} catch (err) {
console.error(err);
}
vm.runInThisContext('var 5;', { filename: 'test.vm' });
console.error('end');

View File

@ -0,0 +1,21 @@
beginning
foo.vm:1
var 4;
^
SyntaxError: Unexpected number
at new Script (node:vm:*)
at createScript (node:vm:*)
at Object.runInThisContext (node:vm:*)
at Object.<anonymous> (*fixtures*vm*vm_display_syntax_error.js:31:6)
test.vm:1
var 5;
^
SyntaxError: Unexpected number
at new Script (node:vm:*)
at createScript (node:vm:*)
at Object.runInThisContext (node:vm:*)
at Object.<anonymous> (*fixtures*vm*vm_display_syntax_error.js:36:4)
Node.js *

View File

@ -0,0 +1,46 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
require('../../common');
Error.stackTraceLimit = 4;
const vm = require('vm');
console.error('beginning');
try {
vm.runInThisContext('throw new Error("boo!")', {
filename: 'test.vm',
displayErrors: false,
});
} catch {
// Continue regardless of error.
}
console.error('middle');
vm.runInThisContext('throw new Error("boo!")', {
filename: 'test.vm',
displayErrors: false,
});
console.error('end');

View File

@ -0,0 +1,13 @@
beginning
middle
test.vm:1
throw new Error("boo!")
^
Error: boo!
at test.vm:1:7
at Script.runInThisContext (node:vm:*)
at Object.runInThisContext (node:vm:*)
at Object.<anonymous> (*fixtures*vm*vm_dont_display_runtime_error.js:41:4)
Node.js *

View File

@ -0,0 +1,46 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
require('../../common');
Error.stackTraceLimit = 4;
const vm = require('vm');
console.error('beginning');
try {
vm.runInThisContext('var 5;', {
filename: 'test.vm',
displayErrors: false,
});
} catch {
// Continue regardless of error.
}
console.error('middle');
vm.runInThisContext('var 5;', {
filename: 'test.vm',
displayErrors: false,
});
console.error('end');

View File

@ -0,0 +1,13 @@
beginning
middle
test.vm:1
var 5;
^
SyntaxError: Unexpected number
at new Script (node:vm:*)
at createScript (node:vm:*)
at Object.runInThisContext (node:vm:*)
at Object.<anonymous> (*fixtures*vm*vm_dont_display_syntax_error.js:41:4)
Node.js *