fix: swallow unhandled exceptions on shutdown (#33)

* fix: swallow unhandled exceptions on shutdown

* chore: bump version
This commit is contained in:
Robo 2024-10-04 00:41:57 +09:00 committed by GitHub
parent 8ac37eb922
commit 720f52339e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 13 deletions

View File

@ -5,11 +5,13 @@
"sources": [
"src/main.cc"
],
"dependencies": [
"<!(node -p \"require('node-addon-api').targets\"):node_addon_api_except"
],
"include_dirs": [
"<!(node -p \"require('node-addon-api').include_dir\")"
],
'cflags!': ['-fno-exceptions'],
'cflags_cc!': ['-fno-exceptions'],
"defines": [ "NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS" ],
'conditions': [
['OS=="mac"', {
"sources": [
@ -17,10 +19,7 @@
],
"defines": [
"MACOS",
],
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES"
}
]
}],
['OS=="mac" and target_arch=="arm64"', {
"xcode_settings": {
@ -42,8 +41,7 @@
"src/windows/NumberPolicy.cc"
],
"defines": [
"WINDOWS",
"_HAS_EXCEPTIONS=1"
"WINDOWS"
],
"libraries": [
"userenv.lib"
@ -53,10 +51,8 @@
},
"msvs_settings": {
"VCCLCompilerTool": {
"ExceptionHandling": 1,
'AdditionalOptions': [
'/guard:cf',
'-std:c++17',
'/we4244',
'/we4267',
'/ZH:SHA_256'

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@vscode/policy-watcher",
"version": "1.1.7",
"version": "1.1.8",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@vscode/policy-watcher",
"version": "1.1.7",
"version": "1.1.8",
"license": "MIT",
"dependencies": {
"bindings": "^1.5.0",

View File

@ -1,6 +1,6 @@
{
"name": "@vscode/policy-watcher",
"version": "1.1.7",
"version": "1.1.8",
"description": "",
"main": "index.js",
"repository": {