js files have content undefined

Hi,
when I try uglify, it overwrites all .js files, but they contet is only one single word "undefined".

stripped debug log: cordova -d prepare
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
Failed to require PlatformApi instance for platform "browser". Using polyfill instead.
Checking config.xml for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in browser platform
No differences found between plugins added to project and installed in browser platform. Continuing...
Generating config.xml from defaults for platform "browser"
Executing script found in hooks directory for hook "after_prepare": hooks\after_prepare\uglify.js
Running command: "C:\Program Files\nodejs\node.exe" D:\NetBeansProjects\ReturnReporting\hooks\after_prepare\uglify.js D:\NetBeansProjects\ReturnReporting
processFiles err: Error: ENOENT: no such file or directory, scandir 'D:\NetBeansProjects\ReturnReporting\platforms\browser\www\module'
uglifying js file D:\NetBeansProjects\ReturnReporting\platforms\browser\www\controller\BaseController.js
uglifying js file D:\NetBeansProjects\ReturnReporting\platforms\browser\www\controller\Home.controller.js
uglifying js file D:\NetBeansProjects\ReturnReporting\platforms\browser\www\controller\Login.controller.js
uglifying js file D:\NetBeansProjects\ReturnReporting\platforms\browser\www\controller\Settings.controller.js
minifying css file D:\NetBeansProjects\ReturnReporting\platforms\browser\www\css\style.css
uglifying js file D:\NetBeansProjects\ReturnReporting\platforms\browser\www\Component.js
encountered a .xml file, not compressing it
uglifying js file D:\NetBeansProjects\ReturnReporting\platforms\browser\www\confighelper.js
uglifying js file D:\NetBeansProjects\ReturnReporting\platforms\browser\www\controller\App.controller.js
uglifying js file D:\NetBeansProjects\ReturnReporting\platforms\browser\www\cordova.js
uglifying js file D:\NetBeansProjects\ReturnReporting\platforms\browser\www\exec.js
encountered a .html file, not compressing it
encountered a .json file, not compressing it

full debug log: uglify_debug.txt
uglify installed from npm
{ name: 'cordova-uglify',
 description: 'Cordova hook that allows you to uglify or minify your apps JavaScript and CSS.',
 'dist-tags': { latest: '0.2.8' },
 versions:
  [ '0.0.1',
    '0.0.2',
    '0.0.3',
    '0.0.4',
    '0.0.5',
    '0.0.6',
    '0.0.7',
    '0.0.8',
    '0.0.9',
    '0.1.0',
    '0.1.1',
    '0.1.2',
    '0.1.3',
    '0.1.4',
    '0.1.5',
    '0.1.6',
    '0.1.7',
    '0.1.8',
    '0.1.9',
    '0.2.0',
    '0.2.1',
    '0.2.2',
    '0.2.3',
    '0.2.4',
    '0.2.5',
    '0.2.6',
    '0.2.7',
    '0.2.8' ],
 maintainers: [ 'rossmartin<EMAIL_ADDRESS>],
 time:
  { modified: '2017-01-19T15:51:35.841Z',
    created: '2014-06-18T03:56:05.284Z',
    '0.0.1': '2014-06-18T03:56:05.284Z',
    '0.0.2': '2014-06-18T05:35:27.107Z',
    '0.0.3': '2014-06-18T05:42:27.368Z',
    '0.0.4': '2014-06-18T05:49:43.994Z',
    '0.0.5': '2014-06-18T05:52:58.761Z',
    '0.0.6': '2014-06-19T05:21:03.197Z',
    '0.0.7': '2014-06-22T22:23:42.514Z',
    '0.0.8': '2014-06-23T00:22:46.231Z',
    '0.0.9': '2014-11-12T05:09:29.435Z',
    '0.1.0': '2014-11-12T05:14:26.594Z',
    '0.1.1': '2014-11-12T05:24:53.626Z',
    '0.1.2': '2014-12-19T15:56:15.972Z',
    '0.1.3': '2014-12-19T16:12:12.345Z',
    '0.1.4': '2015-01-12T22:09:19.752Z',
    '0.1.5': '2015-04-09T20:55:45.840Z',
    '0.1.6': '2015-06-22T14:47:17.993Z',
    '0.1.7': '2015-07-11T02:08:10.764Z',
    '0.1.8': '2015-07-11T02:31:39.325Z',
    '0.1.9': '2015-08-03T21:01:21.157Z',
    '0.2.0': '2015-09-30T13:38:50.084Z',
    '0.2.1': '2015-10-03T16:06:54.283Z',
    '0.2.2': '2015-12-13T22:54:54.170Z',
    '0.2.3': '2015-12-16T01:08:51.901Z',
    '0.2.4': '2016-07-15T15:12:03.110Z',
    '0.2.5': '2016-09-11T17:32:27.083Z',
    '0.2.6': '2016-10-24T14:35:28.131Z',
    '0.2.7': '2016-11-27T04:43:01.635Z',
    '0.2.8': '2017-01-19T15:51:35.841Z' },
 homepage: 'https://github.com/rossmartin/cordova-uglify',
 keywords: [ 'cordova', 'uglify', 'minify', 'hook', 'hooks' ],
 author: 'Ross Martin',
 bugs: { url: 'https://github.com/rossmartin/cordova-uglify/issues' },
 license: 'MIT',
 readmeFilename: 'README.md',
 repository:
  { type: 'git',
    url: 'git+https://github.com/rossmartin/cordova-uglify.git' },
 users:
  { okmogwai: true,
    batosai: true,
    cnring18: true,
    gdevise: true,
    ebbm: true },
 version: '0.2.8',
 dependencies:
  { 'clean-css': '3.4.8',
    'ng-annotate': '0.15.4',
    shelljs: '^0.7.0',
    'uglify-js': '2.4.14' },
 scripts:
  { postinstall: 'node scripts/install.js',
    postuninstall: 'node scripts/uninstall.js' },
 gitHead: '395775651d1b3a5f3625e4fa3d3ec2ca823664b1',
 dist:
  { shasum: '5aa9f69797da4c9d51c2f5184f4dcf0510d1b327',
    tarball: 'https://registry.npmjs.org/cordova-uglify/-/cordova-uglify-0.2.8.tgz' },
 directories: {} }

Sorry for the late response.  Can you please provide the contents of your uglify-config.json?  I think this issue is isolated to Windows.

Hello,
this is my used config:
{
    "alwaysRun": true,
    "recursiveFolderSearch": true,
    "foldersToProcess": [
        "js",
        "css",
        "img",
        "build"
    ],
    "uglifyJsOptions": {
        "compress": {
            "drop_console": true
        },
        "fromString": true,
        "mangle": false
    },
    "cleanCssOptions": {
        "noAdvanced": true,
        "keepSpecialComments": 0
    }
}

It is odd that it is modifying files outside of your foldersToProcess - that is how it appears from your debug file.  This behavior doesn't happen on OSX or Linux - I'll have to see if I can reproduce your issue on Windows.

I'm not sure this is the same problem, but it may help:
I had the same problem, ie .js files with 'undefined' content.
After debugging uglify.js, the following line
result = UglifyJS.minify (res.src, hookConfig.uglifyJsOptions);
return a "result.code" undefined
an overview before correction:
result = UglifyJS.minify(res.src, hookConfig.uglifyJsOptions);
console.log('result.code ' + result.code);
fs.writeFileSync(file, result.code, 'utf8'); // overwrite the original unminified file
break;`

Correction of the line (removed parameter "hookConfig.uglifyJsOptions" ,fast correction, there is surely better)
result = UglifyJS.minify(res.src);
        console.log('result.code ' + result.code);
        fs.writeFileSync(file, result.code, 'utf8'); // overwrite the original unminified file
        break;

Why?
Updates with npm have pushed new version (uglify and other), the uglifyJsOptions parameters did not match the version of UglifyJs
ps: no more time to spend on this project, it works!

@jeromeXoo Thank you for providing this info.  I had some time this evening to look into this issue and it appears that the last PR introduced a few problems.  I thought I had tested it after I merged but apparently I didn't have the latest commit.
I've fixed the issue and published a new version (0.2.9) to npm.  Let me know if you are still having issues.

Hi,
it crashes on first file:
cordova -d prepare
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
Failed to require PlatformApi instance for platform "browser". Using polyfill instead.
Checking config.xml for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in browser platform
No differences found between plugins added to project and installed in browser platform. Continuing...
Generating config.xml from defaults for platform "browser"
Executing script found in hooks directory for hook "after_prepare": hooks\after_prepare\uglify.js
Running command: "C:\Program Files\nodejs\node.exe" D:\NetBeansProjects\ReturnReporting\hooks\after_prepare\uglify.js D:\NetBeansProjects\ReturnReporting
minifying css file D:\NetBeansProjects\ReturnReporting\platforms\browser\www\css\style.css
uglifying js file D:\NetBeansProjects\ReturnReporting\platforms\browser\www\controller\App.controller.js
fs.js:584
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open 'D:\NetBeansProjects\ReturnReporting\sap.ui.define([
    'sap\ui\returnreporting\controller\BaseController',
...
...
 at Error (native)
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.readFileSync (fs.js:431:33)
    at addFile (D:\NetBeansProjects\ReturnReporting\node_modules\uglify-js\tools\node.js:70:22)
    at D:\NetBeansProjects\ReturnReporting\node_modules\uglify-js\tools\node.js:81:17
    at Array.forEach (native)
    at Object.exports.minify (D:\NetBeansProjects\ReturnReporting\node_modules\uglify-js\tools\node.js:79:26)
    at compress (D:\NetBeansProjects\ReturnReporting\hooks\after_prepare\uglify.js:127:25)
    at D:\NetBeansProjects\ReturnReporting\hooks\after_prepare\uglify.js:94:11
    at FSReqWrap.oncomplete (fs.js:82:15)
 Command finished with error code 1: C:\Program Files\nodejs\node.exe D:\NetBeansProjects\ReturnReporting\hooks\after_prepare\uglify.js,D:\NetBeansProjects\ReturnReporting
Error: Hook failed with error code 1: D:\NetBeansProjects\ReturnReporting\hooks\after_prepare\uglify.js

my config:
{
    "alwaysRun": true,
    "recursiveFolderSearch": true,
    "foldersToProcess": [
        "css",
        "controller",
        "model",
        "view"
    ],
    "uglifyJsOptions": {
        "compress": {
            "drop_console": true
        },
        "mangle": false,
        "output": {
            "code": true
        }
    },
    "cleanCssOptions": {
        "noAdvanced": true,
        "keepSpecialComments": 0
    }
}

cordova uglify installed today by npm
D:\NetBeansProjects\ReturnReporting>npm show cordova-uglify

{ name: 'cordova-uglify',
  description: 'Cordova hook that allows you to uglify or minify your apps JavaScript and CSS.',
  'dist-tags': { latest: '0.2.9' },
  versions:
   [ '0.0.1',
     '0.0.2',
     '0.0.3',
     '0.0.4',
     '0.0.5',
     '0.0.6',
     '0.0.7',
     '0.0.8',
     '0.0.9',
     '0.1.0',
     '0.1.1',
     '0.1.2',
     '0.1.3',
     '0.1.4',
     '0.1.5',
     '0.1.6',
     '0.1.7',
     '0.1.8',
     '0.1.9',
     '0.2.0',
     '0.2.1',
     '0.2.2',
     '0.2.3',
     '0.2.4',
     '0.2.5',
     '0.2.6',
     '0.2.7',
     '0.2.8',
     '0.2.9' ],
  maintainers: [ 'rossmartin<EMAIL_ADDRESS>],
  time:
   { modified: '2017-09-22T02:55:35.360Z',
     created: '2014-06-18T03:56:05.284Z',
     '0.0.1': '2014-06-18T03:56:05.284Z',
     '0.0.2': '2014-06-18T05:35:27.107Z',
     '0.0.3': '2014-06-18T05:42:27.368Z',
     '0.0.4': '2014-06-18T05:49:43.994Z',
     '0.0.5': '2014-06-18T05:52:58.761Z',
     '0.0.6': '2014-06-19T05:21:03.197Z',
     '0.0.7': '2014-06-22T22:23:42.514Z',
     '0.0.8': '2014-06-23T00:22:46.231Z',
     '0.0.9': '2014-11-12T05:09:29.435Z',
     '0.1.0': '2014-11-12T05:14:26.594Z',
     '0.1.1': '2014-11-12T05:24:53.626Z',
     '0.1.2': '2014-12-19T15:56:15.972Z',
     '0.1.3': '2014-12-19T16:12:12.345Z',
     '0.1.4': '2015-01-12T22:09:19.752Z',
     '0.1.5': '2015-04-09T20:55:45.840Z',
     '0.1.6': '2015-06-22T14:47:17.993Z',
     '0.1.7': '2015-07-11T02:08:10.764Z',
     '0.1.8': '2015-07-11T02:31:39.325Z',
     '0.1.9': '2015-08-03T21:01:21.157Z',                                                                                10:42
     '0.2.0': '2015-09-30T13:38:50.084Z',
     '0.2.1': '2015-10-03T16:06:54.283Z',
     '0.2.2': '2015-12-13T22:54:54.170Z',
     '0.2.3': '2015-12-16T01:08:51.901Z',
     '0.2.4': '2016-07-15T15:12:03.110Z',
     '0.2.5': '2016-09-11T17:32:27.083Z',
     '0.2.6': '2016-10-24T14:35:28.131Z',
     '0.2.7': '2016-11-27T04:43:01.635Z',
     '0.2.8': '2017-01-19T15:51:35.841Z',
     '0.2.9': '2017-09-22T02:55:35.360Z' },
  homepage: 'https://github.com/rossmartin/cordova-uglify',
  keywords: [ 'cordova', 'uglify', 'minify', 'hook', 'hooks' ],
  author: 'Ross Martin',
  bugs: { url: 'https://github.com/rossmartin/cordova-uglify/issues' },
  license: 'MIT',
  readmeFilename: 'README.md',
  repository:
   { type: 'git',
     url: 'git+https://github.com/rossmartin/cordova-uglify.git' },
  users: { okmogwai: true, cnring18: true, gdevise: true, ebbm: true },
  version: '0.2.9',
  dependencies:
   { 'clean-css': '3.4.8',
     'ng-annotate': '0.15.4',
     shelljs: '^0.7.0',
     'uglify-js': '3.1.1' },
  scripts:
   { postinstall: 'node scripts/install.js',
     postuninstall: 'node scripts/uninstall.js' },
  gitHead: 'e101c6e9f673e43f2431d2a238c4fdbf301870b2',
  dist:
   { shasum: 'af25bcd17b1687d91d60856ad317590901eb3565',
     tarball: 'https://registry.npmjs.org/cordova-uglify/-/cordova-uglify-0.2.9.tgz' },
  directories: {} }```

@rchovan Thanks for reporting the issue.  I have a theatre PC with Windows on it I'll try it this weekend.  I'm not experiencing any issues on Ubuntu or Mac OS.  I wonder if the issue is because the project is on a separate drive than node/windows.

@rossmartin I'm experiencing the same issue where the JS output files only contain "undefined". I am running the latest version of cordova-uglify 0.3.0 as reported by npm and node v8.9.1 on Windows 10.

@koga73 Thanks for letting me know.  Unfortunately my theatre PC that had Windows 10 on it died!  Bad motherboard or power supply I think but I don't plan on reviving it.  Recently I installed 2 Windows VMs to an external HDD on my Macbook for my day job to test IE11 issues.  I'll have to use a VM to test this out and get it fixed.  I haven't forgotten about this just haven't had time - it's frustrating because it works fine on Linux and Mac OS.

@rossmartin Did some digging. Turns out your plugin is fine. Issue is we had an old uglify-config.json. Specifically this line was causing it:
"uglifyJsOptions": { 	"fromString": true }

@koga73 Thanks a bunch for letting me know.  I wonder if this is the issue you are having @rchovan ?
I could update the install script to overwrite the uglify-config.json but I think a better solution is to just document it in the readme and output after installing the package.  I don't want anyone to lose their config on update.

I have this error too. Using default options from README doesn't help.

Hi all,
started experiencing the same issue.
What is generating the empty file in my case is the following code:
BackgroundGeolocation.on('location', (location) => {
// handle your locations here
// to perform long running operation on iOS
// you need to create background task
BackgroundGeolocation.startTask(taskKey => {
// execute long running task
// eg. ajax post location
// IMPORTANT: task has to be ended by endTask
BackgroundGeolocation.endTask(taskKey);
});
});
If I remove it then it works properly

Running uglijs manually, I get
BackgroundGeolocation.on('location', (position) => {
ERROR: Unexpected token: operator (>)
How could I fix it considering is legitimate js code?
Thanks

I'm trying
https://github.com/mishoo/UglifyJS2/tree/harmony
And it seems to solve the issue.
In uglify hook I changed this line:
var UglifyJS = require(path.join(dependencyPath, 'uglify-js'));
to
var UglifyJS = require(path.join(dependencyPath, 'uglify-es'));
So far seems ok, will test more extensively

@luigi37 I think you may have revealed why others are experiencing this same issue.  uglify-js does not work with ES6.  I think most transpile their "modern" JS to ES5 before feeding it to uglify-js.  It appears that uglify-es might be the way to go moving forward to handle minifying code if it is ES6.
There is also this interesting compress option with uglify-es -

ecma (default: 5) -- Pass 6 or greater to enable compress options that
will transform ES5 code into smaller ES6+ equivalent forms.

Thanks for bringing this up @luigi37.  I'm going to give it a go and see how it works out.  If it works with the old and new stuff I'll publish a new version today.

Cool, thanks!

@luigi37 I published a new version (0.3.1) that uses uglify-es.  I tried the latest code with some old projects that were plain ES5 and a new one with ES6 - I had no issues.
I'll be leaving this issue open for now.

@luigi37 and anyone else, please see #39 about the decision to abandon uglify-es in https://github.com/rossmartin/cordova-uglify/commit/eeb41a851fbf23b44439485885394d9e243fce9c (v0.3.2)
Make sure your cordova project's code is transpiled to ES5 (I think you should even if you don't use this hook).

@rossmartin thank you. I'm not familiar with ES6 enough to confirm if transpiling back to ES5 can affect the functionality.
Could you please confirm?
If so, I'm happy with your solution.
Thanks a lot!
Luigi

@luigi37 if you use babel to transpile your ES6 to ES5 it won't affect functionality.  Not all mobile device webviews support ES6 so it would be much safer to transpile.

Thank you.
Is there a way to include the transpile into cordova-uglify to avoid multiple steps?
Thanks
Luigi

@luigi37 That would be a nice feature to have if you're using something like framework 7 & react without using react-scripts.  Those that use Ionic it won't be of any benefit.
I'll think about it - this may be a better candidate for a separate hook.

Thanks Ross,
it would be much appreciated.
Specifically I'm using Cordova with Framework7... Anyway it's a specific
cordova plugin which I use which brought me to the ES6 thing...
Luigi
-----------------------------------
Luigi Paiella
<EMAIL_ADDRESS><EMAIL_ADDRESS>2018-04-15 18:25 GMT+02:00 Ross Martin<EMAIL_ADDRESS>
@luigi37 https://github.com/luigi37 That would be a nice feature to
have if you're using something like framework 7 & react without using
react-scripts. Those that use Ionic it won't be of any benefit.
I'll think about it - this may be a better candidate for a separate hook.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rossmartin/cordova-uglify/issues/35#issuecomment-381419013,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABYb8VG7FS5SzsF9CSELk0fACMVn3isDks5to3R5gaJpZM4PCQEX
.

Thanks Ross,
it would be much appreciated.
Specifically I'm using Cordova with Framework7... Anyway it's a specific
cordova plugin which I use which brought me to the ES6 thing...
Luigi

@rossmartin Hello!
The same issue. Works great with uglify-es but with uglify-js one file always has undefined content.

This same issue is happening to me too, however its only happening to three files, all three files are 9 bytes and all say undefined.
I am running an Ionic v1 app, so know Ionic v2 or ES issues to worry about.  Just straight old AngularJS and JS.

I'm having the same issue, 1 file only has "undefined"
and I'm not on Windows, please read more in #46


Console spammed with errors when adding a fresh SkeletonModification2DTwoBoneIK

Godot version
4.0.2, 4.0.3-RC1, and master
System information
PopOs 22.04, Nvidia
Issue description
Adding a SkeletonModification2DTwoBoneIK spams the console with the following error, without leaving any time for the user to configure it :
scene/2d/skeleton_2d.cpp:642 - Index p_idx = -1 is out of bounds (bones.size() = 0).

Steps to reproduce

Create a 2D scene
Add a Skeleton2D node
Add a new modification stack
Add a SkeletonModification2DTwoBoneIK
Appreciate the error bombing in the console

Minimal reproduction project
No need. It's easily reproduced with a single built-in Skeleton2D node

Besides SkeletonModification2DTwoBoneIK, the message spamming also happens with SkeletonModification2DLookAt but not with any other Modification type (SkeletonModification2D, SkeletonModification2DCCDIK, etc.)

Just for keeping tracking... I'm using the very latest v4.3.dev2.official and SkeletonModification2DLookAt keeps spawning the warning scene/resources/skeleton_modification_2d_lookat.cpp:259 - Cannot verify the bone index for this modification....
I believe the cause is that SkeletonModification bone verification is running when not is_node_ready() so its not ready in the scene tree. But I dont have any solid evidence of that.

Just for keeping tracking... I'm using the very latest v4.3.dev2.official and SkeletonModification2DLookAt keeps spawning the warning scene/resources/skeleton_modification_2d_lookat.cpp:259 - Cannot verify the bone index for this modification....
I believe it is because the bone node is not ready in the scene tree when bone verification is running. But I dont have any solid evidence of that.


[editor] smart insertion

ref #116 for implementation

close this for now, if we can create new completion, then we go back


Trying to print any web page traps the Otter browser

When I try to print a web page either to a real printer or to PDF I get the attached trap
61f7cb81-00ab_01-OTTER-BROWSER-exceptq.txt

This is a (rather known) crash in multi-process mode due to some glitches in shared handle processing in LIBCx. Could you please also provide the console output and also check if it's reproducible in single process mode?

This was in single process mode.

Redirected output:
Unimplemented code.
Killed by SIGTRAP
pid=0x2e04 ppid=0x0028 tid=0x002a slot=0x00ec pri=0x0203 mc=0x0001 ps=0x0010
X:\USR\BIN\OTTER-BROWSER.EXE
QT5WEBC 1:00071544
cs:eip=0000:11281544      ss:esp=f1cb872f:b39d572f      ebp=86920053
ds=0000      es=0000      fs=ae86937a      gs=0000     efl=b359b64b
eax=07c6f648 ebx=1ffc9d7c ecx=07c6f65c edx=07c6f680 edi=f3f21533 esi=07c6ffd4
Creating 2E04_2A.TRP
Moved 2e04_2a.TRP to X:\var\log\app\6204eccb-2e04_2a-OTTER-BROWSER-exceptq.txt
Unimplemented code.
Killed by SIGTRAP
pid=0x2e04 ppid=0x0028 tid=0x002a slot=0x00ec pri=0x0203 mc=0x0001 ps=0x0010
X:\USR\BIN\OTTER-BROWSER.EXE
QT5WEBC 1:00071544
cs:eip=0000:11281544      ss:esp=f1cb872f:b39d572f      ebp=86920053
ds=0000      es=0000      fs=ae86937a      gs=0000     efl=b359b64b
eax=07c6f648 ebx=1ffc9d7c ecx=07c6f65c edx=07c6f680 edi=f3f21533 esi=07c6ffd4
Creating 2E04_2A.TRP
Moved 2e04_2a.TRP to X:\var\log\app\6204eccb-2e04_2a-OTTER-BROWSER-exceptq.txt

Dooble is also affected, however crash reports may differ. See the Dooble ticket.


I can't change the background color of button.

When I use the following sample code, the switch background will turn green when turned on; but then immediately change to the system default orange.
type: custom:bubble-card
card_type: button
entity: switch.test
name: Test
styles: |
.bubble-button-card-container {
background-color: ${state === 'on' ? 'green' : 'red'} !important;
}

Same issue.
@zyi840449 did you fix it ?


frint-store: interop with all reactive libraries

Note: NOT a breaking change
What's done
frint-store now supports interoperability with other reactive libraries, following the TC39 proposal here: https://github.com/tc39/proposal-observable#observablefrom
Usage
As of latest release, we can get our state stream as an Observable like this:
const state$ = store.getState$();

With this PR, we now adhere to common standards as per the TC39 proposal, and can get the state stream by doing:
const state$ = Observable.from(store);

The store.getState$() still remains in the API, and uses from(store) internally.
Why
This will enable us to build more generic tools without having to know too much about the internal APIs of frint-store.
More will follow in #391

So my dear Jean? How is it to use people and build your life on their bones? ;)


Wondering about type API change in 10.x

Hi!
First of all, really excited that you've made some changes to fetch-mock lately! I'm looking forward to upgrading us to 10.x, and have run into some issues with types. I'm very happy to submit a PR, but would like to know whether the change is intentional or not before I do.
Previously, we were using fetch-mock with:
import { MockResponse, MockResponseFunction, MockRequest, MockResponseObject } from 'fetch-mock';

With 10.1.1, this gives the error Module '".."' has no exported member 'MockResponse'. Did you mean to use 'import MockResponse from ".."' instead? and we would need to work around it by doing:
import fetchMock from 'fetch-mock';
type MockResponse = fetchMock.MockResponse;

It's not entirely clear to me whether this was a desired API change (esp. since you don't use typescript :)). If it wasn't, I am happy to send in a PR to fix it.
Thanks so much!

I didn't actually change the types aside from one or two lines related to ESM vs commonjs. Someone raised a bug with that which I thought was fixed last week https://github.com/wheresrhys/fetch-mock/issues/726.
What toolchain are you using? (typescript version, esm or commonjs, node version, testing framework)

It seems like this was introduced by 9ffba4019b76cd9899420e3a4f8ac3e3b3d42237 (switching from export = to export default). To reproduce, you should be able to add import { MockRequest } from '..'; to the top of fetch-mock-tests.ts. For me, it compiles without problem with tsc 5.5.4 on commit ae1573996256a4ec1db05aa30452ebe80fdd3b33. Once I switch to 9ffba4019b76cd9899420e3a4f8ac3e3b3d42237, I run into the error
$ tsc types/fetch-mock-tests.ts
types/fetch-mock-tests.ts:2:10 - error TS2614: Module '".."' has no exported member 'MockRequest'. Did you mean to use 'import MockRequest from ".."' instead?

2 import { MockRequest } from '..';
           ~~~~~~~~~~~

Found 1 error in types/fetch-mock-tests.ts:2

I've tried a few ways to get index.d.ts to export all three of the namespace fetchMock, the constant fetchMock, and the individual types, but haven't been able to do it without repeating a whole bunch of code in index.d.ts (e.g. adding an export type MockRequest = fetchMock.MockRequest; to the bottom of index.d.ts). Happy to send over a PR that does that or anything else you suggest, or we can just update our import statements!

I think I'll unfortunately have to ask you to update your import statements. I tweaked the types a few times in response to feedback and now it does seem that it's compatible with all the combinations of typescript/js x esm/commonjs, so I don't really want to fiddle any more, or give myself more lines of type definitions to maintain

I wonder if you can share details of why you're importing MockResponse etc from fetch-mock? As these are interfaces, rather than classes, I would have assumed that a) you don't need to instantiate them directly and b) the typechecker is able to point you at the definitions whenever you enter invalid values into .mock()
As I don't use typescript in my applications perhaps there is something that I'm misunderstanding about what typescript users of fetch-mock need

I'm gonna reopen this to remind me to think about it for the next version

@fetch-mock/core now exports a lot more stuff - hopefully going forward it hits the right balance, and as the codebase is written in typescript, exporting extra things as and when users need them is more straightforward


[FEATURE]: Support feature Generated Columns

Enhancement Request
Drizzle ORM currently lacks support for SQL generated columns.

Generated columns · Cloudflare D1 docs
https://www.sqlite.org/gencol.html

Example1:

Consider a scenario where a JSON object, containing user's profile information, is inserted into a table.
The generated columns feature of SQL can be used to extract the user's age attribute from the JSON and place it in an external column instantly.
This improves query efficiency as we can directly access the age without having to search within the JSON each time.

Example2:

Consider a situation where a Users table contains a JSON array with a list of IDs from an associated table.
It would streamline the process immensely if, during data insertion into Users, the related table could also auto-populate with the IDs from the JSON array.

#1471

@AndriiSherman This should be closed.


refactor: reshape_for_curator_api function

#TICKET_NUMBER

Reviewers
Functional:
@Bento007
Readability:
@danieljhegeman
Changes

extracted access_type eval logic from reshape_for_curator_api function, into helper function for logical separation of tasks.
Updated corresponding API handlers using the call

QA steps (optional)
Notes for Reviewer

I did end up using the uuid_provided flag, but I think overall this reads a little simpler
Will look into tests, etc. if you like the idea but will otherwise drop it if you don't think it's necessary

@nayib-jose-gloria I may have us wait on addressing this due to these recent discussions (at the end)


Fast IndexIterator for CUDA

Thanks to @asi1024 @shinh
ChainerX indexer used pretty expensive int64 division and modulo operations when calculating array indexes on CUDA.
This was noticeable when arrays were not contiguous, severely affecting the execution time of even simple kernels as ElementWise ones.
This PR replaces the code for index calculation with the same one as Cupy.
In the following test time for chainerx is reduced from 0.70 secs to 0.27
import numpy as np
import cupy
import chainer
import chainerx as chx
import time

def test_bench(name, xp, alloc_fn):
    np.random.seed(42)
    x = np.random.rand(800,389,2,66).astype(np.float32)
    y = np.random.rand(800,389,2,66).astype(np.float32)
    a = alloc_fn(x)
    b = alloc_fn(y)
    a = np.swapaxes(a, 2, 3)
    b = np.swapaxes(b, 2, 3)

    for i in range(1):
        cuda = xp.multiply(a,b)

    cupy.cuda.device.Device().synchronize()
    start = time.time()
    for i in range(400):
        cuda = xp.multiply(a,b)
    cupy.cuda.device.Device().synchronize()
    total = time.time() - start
    print(name, total)

test_bench('cupy', cupy, lambda x: cupy.array(x))
test_bench('chainerx', chx, lambda x: chx.array(x, device='cuda:0'))

PTAL

Jenkins, test this please.

One of the things I don't like, is that we have GPU specific code in a code that should be generic.
This was a "hot-fix" due to the performance problem it addresses but the cuda code needs to be factored out.
Probably overriding it with a specific CudaIndexer class in the cuda_device/ tree should be a nice refactoring.

Jenkins CI test (for commit 3fb14c86cbe20c23135f0b3f4a9064a194776598, target branch master) succeeded!

Regarding the test.
I've been looking where to place it but none of the test files in cuda/ seems to be appropiate.
I think that this test can be carried out in python by allocating a non-contiguous array > 4GB for the indexer to work  with zeros, add 1 inplace and then perform the summation that should be equal to the number of elements
# This is 6GB
a=chainerx.zeros(shape=(32,32,6*1024*1024*128//(32*32)), dtype=chainerx.int64, device='cuda:0')
a=a.swapaxes(2,0)
assert not a.is_contiguous
assert a.sum() == a.shape[0]*a.shape[1]*a.shape[2]

The test should be skipped if the allocation fails due to the GPU not having enough memory?

This PR depends on #8389.

Now #8389 is merged. Could you add tests?

Sure, I have them already, let me just rebase and push

PTAL

Jenkins, test this please.

Jenkins CI test (for commit cce2c8bff38c34b4df16cabea4ced6a39e3adabe, target branch master) succeeded!

flexCI, test this please.

Jenkins CI test (for commit cce2c8bff38c34b4df16cabea4ced6a39e3adabe, target branch master) succeeded!

flexCI, test this please.

Jenkins CI test (for commit cce2c8bff38c34b4df16cabea4ced6a39e3adabe, target branch master) succeeded!

Seems like the slow marker is being ifgnored by pfci?

I agreed with @asi1024 to comment the tests and run pfnCIs once to check if they are the reason behind the errors.
flexCI, test this please.

Jenkins CI test (for commit 3f7cf1e970be23394f75fc97d98b436a71bc0b85, target branch master) succeeded!

This makes no sense since the cpu code is let untouched 😥

Checking again with reduced test-sizes
Jenkins, test this please

Jenkins, test this please

Jenkins, test this please

Jenkins, test this please

Jenkins, test this please

Jenkins, test this please

Jenkins, test this please

Jenkins, test this please

Jenkins CI test (for commit a88fdc0c8a628142935f0d546f78aace850b70be, target branch master) failed with status FAILURE.

Jenkins, test this please

Jenkins CI test (for commit 5957e11cdab5f5fe73db42f357c970d6229b890e, target branch master) failed with status FAILURE.

Jenkins, test this please

Jenkins, test this please

Jenkins CI test (for commit 0627f4107637bb3a78ebba40e129abcb167506e5, target branch master) failed with status FAILURE.

Jenkins, test this please

Jenkins, test this please

Jenkins, test this please

Jenkins, test this please

Jenkins CI test (for commit 49e2a4df3fa123981562768a2657320b00209b58, target branch master) failed with status FAILURE.

Jenkins, test this please.

Jenkins, test this please.

Jenkins, test this please.

Jenkins CI test (for commit ea6d7d0d583a1950213aa607e00f4dc6bbd5c41b, target branch master) failed with status FAILURE.

Jenkins, test this please.

Jenkins, test this please.

Jenkins, test this please.

Jenkins, test this please.

Jenkins, test this please.

Jenkins CI test (for commit d7a11683395dbff6f04192aa20c4babadb85761d, target branch master) succeeded!

flexCI, test this please.

Jenkins CI test (for commit 627df8007f17772c939ad97b1d3fbac13723843d, target branch master) succeeded!

flexCI, test this please.

Jenkins CI test (for commit 9dcf904e81658b193c5c0b976ecf89448d939602, target branch master) succeeded!

flexCI, test this please.

flexCI, test this please.

Jenkins CI test (for commit bbcbbdceb727a28762a00d40e5297697d9c99034, target branch master) succeeded!

flexCI, test this please.

Jenkins CI test (for commit 75c9fb83936e1fc265937cefd282838723c3b518, target branch master) succeeded!

Jenkins, test this please.

Jenkins CI test (for commit e26af2a9886c553eb29240bbfdd5478e79f12c1e, target branch master) succeeded!

Jenkins, test this please

Jenkins, test this please

Jenkins CI test (for commit 941d5e54001fcdb9861724cc9ad74137a0017133, target branch master) succeeded!

Travis failure seems unrelated to this PR. (ref. #8481)

LGTM!


Should item_assets be required in core?

Having the field item_assets be required i collections makes sense when Item Assets is its own extension, but if it is required in core I can see some possible issues. The field works well when the collection is of a set of homogeneous data, but questions arise of what happens when the data is gathered from disparate sources - perhaps from different users posting in items to a server that implements the Transaction extension. For example, what happens if users add two items with the following assets:
"assets": {
  "image": {
    "title": "Image",
    "description": "The image",
    "href": "...",
    "type": "image/tiff",
    "roles": ["data"]
  },
  "thumb": {
    "title": "Thumbnail",
    "description": "A thumbnail image",
    "href": "...",
    "type": "image/tiff",
    "roles": ["thumbnail"]
  }
}

"assets": {
  "image": {
    "title": "The City",
    "description": "Satelite image over The City",
    "href": "...",
    "type": "image/png",
    "roles": ["data"]
  },
  "image-small": {
    "title": "The City",
    "description": "Same, but the houses are tiny",
    "href": "...",
    "type": "image/png",
    "roles": ["thumbnail"]
  }
}

In this case, in item_assets, what should the title of the image key be? And since it may be difficult to control what keys the users use, as with the thumbnail in this example, the map may potentially grow very large.

Good catch, thanks.
item_assets is not meant to be required, it is a copy&paste mistake on our end, just in the written Markdown documentation.
The JSON schema doesn't enforce item_assets fortunately.
See PR #1314


exec: "elevate.cmd": executable file not found in %PATH%:[Issue]:

What happened?

What did you expect to happen?
normail to use
Version
1.1.11 or newer (Default)
Which version of Windows?
Windows 11+
Which locale?
None
Which shell are you running NVM4W in?
PowerShell
User Permissions?
Administrative Privileges, Elevated
Is Developer Mode enabled?
None
Relevant log/console output
PS C:\Users\xxx> nvm debug
Running NVM for Windows with administrator privileges.

管理员: Windows PowerShell
Windows Version: 10.0 (Build 22621)

NVM4W Version:      1.1.12
NVM4W Path:         C:\Users\xxx\wyc\myNvm\nvm\nvm.exe
NVM4W Settings:     C:\Users\xxx\wyc\myNvm\nvm\settings.txt
NVM_HOME:           C:\Users\xxx\wyc\myNvm\nvm
NVM_SYMLINK:        C:\Users\xxx\wyc\myNvm\nvm\nodejsx
Node Installations: C:\Users\xxx\wyc\myNvm\nvm

Total Node.js Versions: 2
Active Node.js Version: none
(run "nvm use <version>" to activate a version)
NVM_SYMLINK does not exist yet. This is auto-created when "nvm use" is run.

IPv6 is enabled. This can slow downloads significantly.
If you are experiencing npm problems, check the npm mirror (https://npm.taobao.org/mirrors/npm/) to assure it is online and accessible.

PROBLEMS DETECTED
-----------------
The following Node installations are invalid (missing node.exe): v11.15.0 - consider reinstalling these versions

Find help at https://github.com/coreybutler/nvm-windows/wiki/Common-Issues
PS C:\Users\xxx>

Debug Output
none

Anything else?
none

@wei63w how did you install this? You're missing a file that ships with the official installer.

I ran into the same problem with the NVM I installed with scoop
PS C:\EDGE\LightReader> nvm install 16.20.2
Version 16.20.2 is already installed.
PS C:\EDGE\LightReader> nvm use 16.20.2
exec: "elevate.cmd": executable file not found in %PATH%:
PS C:\EDGE\LightReader> scoop update nvm
nvm: 1.1.12 (latest version)
Latest versions for all apps are installed! For more information try 'scoop status'

@wei63w how did you install this? You're missing a file that ships with the official installer.

I ran into the same problem with the NVM I installed with scoop
PS C:\EDGE\LightReader> nvm install 16.20.2
Version 16.20.2 is already installed.
PS C:\EDGE\LightReader> nvm use 16.20.2
exec: "elevate.cmd": executable file not found in %PATH%:
PS C:\EDGE\LightReader> scoop update nvm
nvm: 1.1.12 (latest version)
Latest versions for all apps are installed! For more information try 'scoop status'

I can confirm reverting to 1.1.12 fixes the issue. I will hold it at that version

I'm closing this because it appears to be a problem with the Scoop installer (which we do not maintain). elevate.vbs is shipped with the installer/updater.
@filipworksdev - I'm not sure what you're "reverting" from. Version 1.1.12 is the latest.

@filipworksdev - I'm not sure what you're "reverting" from. Version 1.1.12 is the latest.

reverting from scoop. In scoop you can install any version you want by specifying with @ like this  scoop install<EMAIL_ADDRESS>WARN  Given version (1.1.11) does not match manifest (1.1.12)
WARN  Attempting to generate manifest for 'nvm' (1.1.11)
Autoupdating nvm
Searching hash for nvm-noinstall.zip in https://github.com/coreybutler/nvm-windows/releases/download/1.1.11/nvm-noinstall.zip.checksum.txt
Found: md5:8f8a25a8b7dd42297ffebcf9373811be using Extract Mode
Writing updated nvm manifest
Installing 'nvm' (1.1.11) [64bit]
....
'nvm' (1.1.11) was installed successfully!

Nvm 1.1.11 works perfectly where as the latest 1.1.12 does not. Hope that helps clear up what I am reverting.

@filipworksdev got it, thanks for clarifying!

@filipworksdev - I'm not sure what you're "reverting" from. Version 1.1.12 is the latest.

reverting from scoop. In scoop you can install any version you want by specifying with @ like this scoop install<EMAIL_ADDRESS>Here is a sample output what you get when you install a specific version in this case 1.1.11
WARN  Given version (1.1.11) does not match manifest (1.1.12)
WARN  Attempting to generate manifest for 'nvm' (1.1.11)
Autoupdating nvm
Searching hash for nvm-noinstall.zip in https://github.com/coreybutler/nvm-windows/releases/download/1.1.11/nvm-noinstall.zip.checksum.txt
Found: md5:8f8a25a8b7dd42297ffebcf9373811be using Extract Mode
Writing updated nvm manifest
Installing 'nvm' (1.1.11) [64bit]
....
'nvm' (1.1.11) was installed successfully!

Nvm 1.1.11 works perfectly where as the latest 1.1.12 does not. Hope that helps clear up what I am reverting.
The issue is from scoop.

it works for me!

You can't just run the exe without configuring several environment variables and setting up a few files. This is why there is an installer. The raw exe is for people who choose to manually install.
People are apparently assuming the "noinstall" option means you don't have to install the app. That is not the case. That option means "no installer included". Most people should use the official installer. Those who need to create mass deployment/silent installation options (i.e. deploy via Active Directory) are the target audience for the "noinstall" option.

Additionally, most Windows environments need to restart the terminal window in order to recognize updates to the PATH and other environment variables.

@coreybutler

I didn't run "just the exe". I used the installer, it found a node version and started managing it. It also added environment variables and so on.
The environment variables were added normally and I could use "echo %NVM_HOME" to get the path, but just running "nvm" said there is no exe with that name until I restarted Windows. That's a completely separate issue, I think. And probably one with Windows itself.
Version 1.1.12 (installed using installer) did not work whatsoever. Even just running "nvm" by itself did not work and produced the message in the original post here. Then I uninstalled it (normally) and installed 1.1.11 via its installer (also gotten from GitHub releases) and it worked flawlessly. Without doing anything else than running the installer.

@Panossa - To clarify, did you install via Scoop (per the topic of this thread), then attempt to install with the official installer from the releases (nvm-setup.exe in this repo)? It sounds to me like there is %PATH% confusion on your system, perhaps two instances of NVM4W conflicting with each other. Sometimes Windows will expand the NVM_HOME variable to the actual path when adding to %PATH%. Everything you're describing could be caused by this.


Confusion around StructuredLogger

In debugging an issue where the newrelic-cli didn't appear to be logging at the correct log level, I arrived at the SetLevel call in StructuredLogger.
https://github.com/newrelic/newrelic-client-go/blob/master/internal/logging/structured_logger.go#L34
In many client packages, we call config.GetLogger() which will initialize the logger if it has not already been called, and then use the returned logger as the object that we make the log message calls.
https://github.com/newrelic/newrelic-client-go/blob/master/pkg/config/config.go#L94
Related to https://github.com/newrelic/newrelic-client-go/issues/576, StructuredLogger is not using a private logger, but configuring the global logger.
This is confusing, because when the client is used from an external package, as is common, it means that the first API call to the API will likely not have reached the GetLogger yet, and so the global logger gets reconfigured.  This is not desirable as it means that if the logger was configured outside before an API call is made, then the logger is then modified.
It appears that the primary use of the StructuredLogger is to wrap the WithFields calls on logrus.Logger, but those calls are not accessing any private logger, and so those could be raw methods on the logging package, rather than hanging off the StructuredLogger.
If the goal of the StrcuturedLogger is to use a private logger, https://github.com/newrelic/newrelic-client-go/pull/586 will do this, though it may have other unintended consequences.  In any case, the private logger is not happening currently.
If instead, we want the client to use the global logger, which it will share with all the callers that depend on this project, then I think we have a little work to do.  In this case, it might be advisable to remove the StructuredLogger entirely and instead replace all the config.GetLogger() and the subsequent logger.Info() etc usage with just direct calls to log or move the helpers to public methods on the logging package.  For the remaining methods on the StructuredLogger, I think we can discuss the feature deficit, like JSON logging etc, and decide if that is valuable.
Given that this project is a component of other projects, my expectation here is that we have very slim opinions about how logging should be handled, which would allow the caller projects to contain these opinions.  Let's discuss which direction we want to take this and move forward.

This should be resolved with https://github.com/newrelic/newrelic-client-go/pull/586

This should be resolved with https://github.com/newrelic/newrelic-client-go/pull/586


GPG key trust issue

When attempting a run during mem acquisition the following error is thrown by marsho
2017-05-13T14:49:19 - aws_ir.plans.host - INFO - Attempting run margarita shotgun for ubuntu on <IP_ADDRESS> with /Users/krug/Downloads/testing.pem
2017-05-13T14:49:19 - margaritashotgun.client - CRITICAL - Repository signing key found at https://threatresponse-lime-modules.s3.amazonaws.com/REPO_SIGNING_KEY.asc is not trusted on the local system, fingerprint: 80DA92CB09161F241C8F9BC918BA980367172B17

Document or provide logic to install the key.
My OS is MacOS Sierra
Acquisition OS is 14.04 Ubuntu HVM

Any thoughts on this one @joelferrier

@andrewkrug I think we should do both.

Prompt the user to install the key, and continue/retry memory capture after the key has been installed.  I'm not sure if it's best for this to be implemented in aws_ir, or in margarita shotgun
Document installing the threat response signing key once it's published to a key server and the email address<EMAIL_ADDRESS>has been created.  This documentation should be included in both the aws_ir and margarita shotgun repositories

Right now I'm leaning towards implementing option 1 in margarita shotgun, we may want to add a flag that disables interactive elements in conjunction with this.

@joelferrier I think non-interactive should be the default and prompts enabled with a --interactive flag.  Since most people are running in a non-intervention kind of mode.

Prompt the user to install the key, and continue/retry memory capture after the key has been installed. I'm not sure if it's best for this to be implemented in aws_ir, or in margarita shotgun

^^ Agree on this.

@andrewkrug after some thought I think the GPG key handling should be implemented in margarita shotgun.
I don't agree with you about non-interactive being the default when it comes to the GPG key handling unless we can handle some edge cases.
My primary concern is the risk of a compromised public kernel module repo where modules, signatures, and the signing key stored in the repository have been replaced.
We could try pinning the default signing key fingerprint in margarita shotgun.  That should let us throw appropriate alarms if we get an unexpected signing key.  We would have to allow the pinned fingerprint to be overridden for users hosting their own kernel module repo however.
I would feel much more comfortable implementing an automatic import if we were pinning fingerprints etc, I may be missing an obvious solution to this however, I am curious what you think.

Should we create the equivalent of a flag to auto-install gpg if necessary?  Equiv to yum update -y where if new keys are found it just installs them.
I agree that mitm is a concern.

We could try pinning the default signing key fingerprint in margarita shotgun. That should let us throw appropriate alarms if we get an unexpected signing key.

Key pinning is historically problematic for anything that you don't control 100% of the install base for.  Unless you are willing to just break everything out there if you ever need to rotate the pinned key.  ( See HPKP in CSP )
I could also see us provided a packed AMI or something + docker container with the key included.  I think this is reasonable as a way to make it zero touch.

https://github.com/ThreatResponse/aws_ir/commit/3920e1e68cc4daf444d8afe25c506e1ca75ae739


feat: Syncers for synchable Id-Providers

Currently, it seems casdoor only support database syncer.
In the case, we use AzureAD/WeCom as idP. It will also need some syncer for API-like Id-Providers. For example in this case, the admin role can only modify user info, or assign roles, after the specific user logged in.
So, I think, we need some way to solve this issue:

Extend Id-Provider interface with sync()? For example, AzureAD provide Microsoft Graph API, and MS Graph's Golang SDK. And other Id-Providers may provide similiar APIs
Refactor Syncer interface, for non-database like syncers, like: HTTP based? or external application ?

Any comments about this feature request?

@leoncamel sounds good. Can you split the syncers to different issues? One issue for one syncer. Because one syncer itself is a big code change itself

@hsluoyz Sure, I will submit idP related syncer as new issue. This issue remains as a umbrella issue to discuss general concepts.

@leoncamel can you make PR?

@leoncamel I think this can be implemented by a new syncer. There's no need to build on top of the OAuth provider. They use different APIs and have nothing much shared in common.

@hsluoyz Yes.
But, I not sure how to share parameters between idP and its syncer. For the WeCom case, they may share ClientID and ClientSecret?
Any thoughts?

@leoncamel don't need to share. Just store it in syncer object for a second time

Closed as stale


Error on creation new project

How can I fix it ?
Error<EMAIL_ADDRESS>postinstall: typings install
spawn ENOENT
at ChildProcess. (/usr/local/lib/node_modules/angular-cli/node_modules/npm/lib/utils/spawn.js:17:16)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:821:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

Duplicate of https://github.com/angular/angular-cli/issues/1092. There is a temporary solution in there, and a permanent solution in the next release.


Add use-package install to README

Hi I just added use-package install to the README file. I think that's helpful.
BTW I think you sure bump the release version to 0.3 (I know there is a 0.3v branch but the Releases tab on the right is showing 0.2)

Thanks!

No, thank you! I was really close to leave Emacs for Vscode for julia development. you saved me.
BTW, do you want to add tests and CI to the package? I was thinking about adding makem and Github actions. What do you think?

It is not quite clear to me how CI would work on this package. If you have an idea I am happy to accept a PR!

Well from what I experienced in the last year, this package suffers from bugs(or miss features) in lsp-mode and LanguageServer.jl.
So I think to check in the CI the matrix versions of:
emacs
lsp-mode
LanguageServer
julia-mode
So if we detect a bug we could report it early. Is it makes sense?
I didn't use makem but I try to mess with it and make a PR.

That would be great!

Hi, I start working on that (fork ).
Do you know any way to make sure that the language server is up? with elisp for testing
And I'm not sure how the tests are passing, because I check for julia cmd to be present and I didn't configure it on the yml file :man_shrugging:

@ordicker I would like to help test this, so it would be good if you could open an issue and a matching pull request for this new CI activity to discuss your progress.


Use docker multi-stage build to reduce the docker image size

Since the official pika docker image size is quite large, around 2.15GB, we can use multi-stage builds to reduce the docker image size.
With multi-stage build, we reduce the pika docker image size to ~ 380MB:

Hope this PR can be accepted, thank you.

And I found that why the official pika docker image size was so large now, it caused by the ${PIKA_BUILD_DIR}.
You can add rm ${PIKA_BUILD_DIR} in the Dockerfile, this simply action can reduce 1.6GB of the image size.


[KYUUBI #4247]change the if condition to equal

change the if condition to equal

Why are the changes needed?

How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[ ] Run test locally before make a pull request

Hi @edddddy, thanks for your contribution, would you please fill out the PR template, and supply more background?

Codecov Report

Merging #4261 (11f19ec) into master (1b92d80) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #4261      +/-   ##
============================================
- Coverage     53.41%   53.38%   -0.03%
  Complexity       13       13
============================================
  Files           560      560
  Lines         30562    30562
  Branches       4139     4139
============================================
- Hits          16324    16316       -8
- Misses        12705    12709       +4
- Partials       1533     1537       +4

Impacted Files
Coverage Δ

.../apache/kyuubi/server/api/v1/BatchesResource.scala
70.09% <0.00%> (-2.81%)
:arrow_down:

...ache/kyuubi/operation/KyuubiOperationManager.scala
80.00% <0.00%> (-2.67%)
:arrow_down:

...he/kyuubi/ha/client/etcd/EtcdDiscoveryClient.scala
69.02% <0.00%> (-0.55%)
:arrow_down:

...in/scala/org/apache/kyuubi/config/KyuubiConf.scala
97.44% <0.00%> (-0.07%)
:arrow_down:

...n/scala/org/apache/kyuubi/engine/ProcBuilder.scala
79.01% <0.00%> (+0.61%)
:arrow_up:

...apache/kyuubi/engine/JpsApplicationOperation.scala
80.64% <0.00%> (+3.22%)
:arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


makes endless-game mode configurable.

Not sure what is purpose of this change. So the game can continue or so it prevents from issuing messages about who won?

Not sure what is purpose of this change. So the game can continue or so it prevents from issuing messages about who won?

nevermind this PR. not sure what i was seeing here, but this works as intended. sorry for wasting your time on this.

nevermind this PR. not sure what i was seeing here, but this works as intended. sorry for wasting your time on this.

No problem Stefan. The game ending needs some work anyway, but I guess that can wait.


⚠ Release site not found ⚠

Description of the bug
If you check the release link go-skill-icons.vercel.app you can see that it throws 404
Steps To Reproduce
Just open  go-skill-icons.vercel.app
Additional Information
No response
Code of Conduct Acknowledgment

[X] I have read and agree to the Code of Conduct.

well... it's not really a bug :/ it's normal


[Q] Is there a way to create Launch queues using python

Hi ,
I am asking this question more from MLOPS persepctive . When I am setting up a pipeline to deploy WandB server and launch agents on my kubernetes cluster , I also want to create the launch queues programitically . I have not seen any cli options to achieve that . From the public API documentation , I can see there is a class called Runqueue (https://docs.wandb.ai/ref/python/public-api/runqueue) .
I am though unable to find how to call this class or the method ? There are no examples around . I know this may be a very trivial question , but can someone please point me in the right direction . How to invoke this class or method .

hey @abindg - we have this example Colab notebook for how to create launch queues programmatically

WandB Internal User commented:
umakrishnaswamy commented:
hey @abindg - we have this example Colab notebook for how to create launch queues programmatically

Hi Thanks . This can be closed . I used
api.create_run_queue(name=queue_name, entity=entity, type="kubernetes", config=config)


middleware/file: dont reload zone with no SOA change

Right now we just reload - should check the SOA and if not changed -> do nothing.

With the new ignore_serial that I'm adding to the file middleware this seems a bit senseless. A better way is being able to use ignore_serial in auto as well. Meaning we should store some hash sum of the file and only reload when that has changed (way may or may not involved a SOA serial update)

SOA just seemed to reflect the general behaviour between DNS servers best, but I agree that using a hash best reflects a change. Question is does the reload loop generate the hash of every file every time or are we basically looking at the timestamp and if that changed we generate a new hash and compare to the currently deployed hash/file?
As mentioned in the ignore_serial issue, I'm still not sure about the use case. But it seems most of the features in file would make sense in auto, which leads me to the same suggestions: Should the file and auto middleware be merged to prevent duplicating every feature?

[ Quoting<EMAIL_ADDRESS>in "Re: [miekg/coredns] middleware/file..." ]

SOA just seemed to reflect the general behaviour between DNS servers best, but I agree that using a hash best reflects a change. Question is does the reload loop generate the hash of every file every time or are we basically looking at the timestamp and if that changed we generate a new hash and compare to the currently deployed hash/file?

I believe just hashing each file works best.

As mentioned in the ignore_serial issue, I'm still not sure about the use case. But it seems most of the features in file would make sense in auto, which leads me to the same suggestions: Should the file and auto middleware be merged to prevent duplicating every feature?

SOA serial is a relic from the 80s and doing DNS for at least 15 years, I
still forget to up the SOA serial whenever I change a zone. Use-case for me is
non signed zone that I run (I have a few). For signed zones the SOA is
incremented for me - for dynamic DNSSEC signing it does not matter.


Wording update to pilet scaffolding

New Pull Request
For more information, see the CONTRIBUTING guide.
Prerequisites
Please make sure you can check the following boxes:

[x] I have read the CONTRIBUTING document
[x] My code follows the code style of this project
[x] All new and existing tests passed

Type(s) of Changes
Minor wording update to the scaffolding logic for Pilets.
Contribution Type
What types of changes does your code introduce? Put an x in all the boxes that apply:

[x] Bug fix (non-breaking change which fixes an issue, please reference the issue id)
[ ] New feature (non-breaking change which adds functionality, make sure to open an associated issue first)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[x] I have updated the documentation accordingly
[ ] I have added tests to cover my changes

Description
Applied a minor wording update to the notification and tile, which is displayed by a new created Pilet using the Prial-CLI. The guidelines for creating the first Pilet have been changed, too.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Lothar Schöttner seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


[bug] experimentalUseElementAccessInTemplate disables type check for used properties

experimentalUseElementAccessInTemplate option makes protected field errors (ts-plugin(2339)) go away, but at the same time, it stops bothering with variables used in the template:
<script lang="ts">
  @Component({}) export default class ... {
    protected config = { whatever: true };
    protected messages = {
      first: 'Success!'
    };
  }
</script>

<template>
  <MyComponent
    :config="cornfig.whatever"
    :message="messages.first"
  />
</template>

It won't complain about cornfig and cornfig.whatever will be of type any. At the same time, if I hover messages in template, it won't hint the type, but it will hint the type for messages.first (string). Is it possible to have properties checked and have their type provided?
If I disable experimentalUseElementAccessInTemplate, the ts-plugin(2339) error comes back, but so do the type checks. It will then complain that cornfig does not exist and will show type for messages.
Thank you!

Actually, even messages.boo won't give an error of a non-existant boo property. It will have type of any

Where does the Component decorator from?

import Component from 'vue-class-component';

I guess this is because using index signatures to classes is allowed in typescript:
class a {}

a['foo'] // No errors

But it should error out on unknown property cornfig and should show type of messages

We read properties directly from the class, so Class.xxx will report an error, but Class['xxx'] doesn't. We need to find a workaround

This issue has been fixed by #4354

This issue has been fixed by #4354

It seems experimentalUseElementAccessInTemplate was removed. Does it work as is? Also, does it work with Vue 2.7?

Yes, it will work with Vue 2.7, but may be necessary to ensure that vueCompilerOptions.target = 2.7 in tsconfig.json.

It fails without "vue.server.includeLanguages": ["vue"] in .vscode/settings.json. It can't call include on undefined


FR: Allow GetBlockRange to stream blocks in descending order

What is your feature request?
Right now, the GetBlockRange method streams blocks from lowest height to tallest height. For BlazeSync, it might be useful to have the blocks streamed backwards - i.e., tallest height to lowest height. Maybe have an optional parameter that specifies the direction in which to stream blocks
How would this feature help you?
Streaming blocks backwards allows wallets to detect incoming spends quicker, allowing users access to their most recent transactions first.
cc: @LarryRuane , @braddmiller

This should be easy, just generalize GetBlockRange() to run the loop index either up or down. Rather than adding an optional parameter, it may make sense to just allow start=20, end=10 to mean return 20, 19, ... 10. Currently, those arguments would return an empty list. This approach is almost backward-compatible -- close enough, I think.

This is a great idea. We should just do this.

This looks like a really great solution, adding to our sprint

@mdr0id, can we get PR #355 up in our LWD instance for testing?


Fix Mypy errors and small fixes

Migration is safe: SELECT * FROM application WHERE award_id IS NULL OR borrower_id IS NULL; has 0 rows.

fix: Refresh signing key if Cognito rotated it
chore: Fix simple mypy errors in Cognito client usage
chore: Split ResetPassword from BasicUser #376
chore: Ignore missing type info that can't be fixed without changing third-party module
fix: Make Application.award_id and borrower_id non-nullable
chore: Align model with model_id nullability, except Application.lender non-nullable (like .credit_product since b3d05bf)

Pull Request Test Coverage Report for Build<PHONE_NUMBER>9
Details

21 of 29 (72.41%)  changed or added relevant lines in 5 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.04%) to 86.195%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

app/aws.py
0
1
0.0%

app/auth.py
9
11
81.82%

app/routers/users.py
0
5
0.0%

Files with Coverage Reduction
New Missed Lines
%

app/aws.py
1
63.64%

Totals

Change from base Build<PHONE_NUMBER>6:
0.04%

Covered Lines:
1817

Relevant Lines:
2108

💛  - Coveralls

@yolile Merge whenever you're ready. There is a migration (but it should not affect the app).


chore: Merging from master 6/29

Description
Merging latest from master into this feature branch.
Task Item
#minor
Screenshots
N/A

Aged out.


Folding in python

How can I fold function definitions in a Python document?
I've done it before with plugins, but I wanted to know if there is anything included in this bundle.
Cheers and thanks for your work!

:set foldmethod=indent should work. This is mapped as F in vimrcs/filetypes.vim#L10, so just press shift+f.


What's the folder/file structure for marzipano's  flat demo?

Title tells my question, I need to know the folder/file structure as cube images have it for flat images

The folder structure for the flat demo is determined by the tileUrl function defined here:
https://github.com/google/marzipano/blob/master/demos/flat/index.js#L26
This function receives as arguments the zoom, x and y coordinates of the tile (x=0 and y=0 is the tile in the top left; zoom=0 is the first zoom level), and returns the URL for the tile. You can use any other folder structure, as long as you rewrite this function accordingly.


systemd/network: Fix dummy if exclusion rule in default networkd unit

The default networkd unit should not apply to all devices, e.g., not to bridges, tunnels, dummy interfaces etc. However, for dummy interfaces the rule was wrong.
Fix the exclusion rule for dummy interfaces, which are not a type but a certain driver.
How to use
Testing done
Was tested by copying it to /etc/systemd/network/ and doing ip link add dummy0 type dummy to create such an interface and networkctl reload to apply the unit change and see that the interface becomes unmanaged.

Observing behavior like in natural science, not following rules on paper like in math or engineering ;)
Actually it would be nice to submit our default network unit file as example in the systemd docs to spare others running into the same problems.

Observing behavior like in natural science, not following rules on paper like in math or engineering ;)

Yeah, I was being lazy. :) Repeated the steps in a VM, seems to be doing the trick.

Actually it would be nice to submit our default network unit file as example in the systemd docs to spare others running into the same problems.

Right, there seem to be no example for configuring links as unmanaged.


Awkward button layout at some widths

At around 1200px wide, the Download buttons stack in an awkward way:

Moot, closing


Add Wedo Blocks To Vertical Grammer

Thanks! We are still rethinking the extensions interface (see https://github.com/LLK/scratch-vm/issues/194) and so we won't be open to adding this to the VM for some time, but this is interesting to look at in the meantime.
Right now it looks like this is not passing tests due to some issues with your line breaks. See the travis logs for more info:
https://travis-ci.org/LLK/scratch-blocks/jobs/167980299
In the future I recommend running the tests locally before submitting a PR.


Feature Request Support for Apple OpenELM

Please add support for Apple OpenELM
https://huggingface.co/apple/OpenELM

+1

Oh I haven't yet taken a look at the arch, but will do so this week!


Refactoring xmlrpc steps

Put all xmlrpc steps in only one file,
for the future this will make refactoring more easy.

@Bischoff  jfyi


Cannot type spaces into input within top-bar navigation

When placing an input within the top-bar element you can no longer type spaces into it.
For example: "hello world" is not possible, instead it would format as "helloworld"
Using latest version of Foundation 6.

Can't recreate with a basic top bar example—can you post the HTML you're using?

Managed to recreate it fine using this F6 codepen as you can see on this post
http://foundation.zurb.com/forum/posts/37908-input-inside-top-bar-doesnt-allow-spaces

Ah okay, this is actually happening from am <input> being inside a dropdown menu, not a top bar. (Top bar has no JavaScript.)
I think this is happening because the dropdown menu uses the space bar to handle manipulating the menu.

I found two workarounds for this:
Disable keydown events on li.menu-text:
$('li.menu-text').off('keydown');
Or disable foundation keyboard events completely:
Foundation.Keyboard.handleKey = function(){};

This issue was caused by the keyboard navigation part of the Dropdown Menu. It should be fixed by now as shown in this pen I updated to Foundation 6.2.3.

Does this fix come after the tag v6.2.3? I'm still seeing the issue in the latest dist/foundation.min.js.

Does it still occur in the Pen I linked above for you? It is using version 6.2.3 and it works for me there.

Oops, nevermind. It is indeed definitely working in 6.2.3. My bad!


fix(dependency): remove jquery dependency & refactor new box selector

fix: #139
Remove jquery dependency, it seems that DOM API also works well for jquery.Event.
onSelect={(event) => {
-  const s = $(event.target).val();
+  const s = event.target.value;
    if (s === null) {
      return;
    }

We can get the option value attribute form select2:

@hsluoyz
If we insist on usingselect2, this dependency must be installed in package.json.
ref: https://github.com/rkit/react-select2-wrapper/issues/96


Optimizer Rework 2020

Pull Request Description
What issue does this change request address? (Use "#" before the issue to link it, i.e., #42.)
Closes #867
What are the significant changes in functionality due to this change request?
Reworks the Optimizer to be more easily extensible and make better use of inheritance.

For Change Control Board: Change Request Review
The following review must be completed by an authorized member of the Change Control Board.

[x] 1. Review all computer code.
[x] 2. If any changes occur to the input syntax, there must be an accompanying change to the user manual and xsd schema. If the input syntax change deprecates existing input files, a conversion script needs to be added (see Conversion Scripts).
[x] 3. Make sure the Python code and commenting standards are respected (camelBack, etc.) - See on the wiki for details.
[x] 4. Automated Tests should pass, including run_tests, pylint, manual building and xsd tests. If there are changes to Simulation.py or JobHandler.py the qsub tests must pass.
[x] 5. If significant functionality is added, there must  be tests added to check this. Tests should cover all possible options.  Multiple short tests are preferred over one large test. If new development on the internal JobHandler parallel system is performed, a cluster test must be added setting, in  XML block, the node <internalParallel> to True.
[x] 6. If the change modifies or adds a requirement or a requirement based test case, the Change Control Board's Chair or designee also needs to approve the change.  The requirements and the requirements test shall be in sync.
[x] 7. The merge request must reference an issue.  If the issue is closed, the issue close checklist shall be done.
[x] 8. If an analytic test is changed/added is the the analytic documentation updated/added?
[x] 9. If any test used as a basis for documentation examples (currently found in raven/tests/framework/user_guide and raven/docs/workshop) have been changed, the associated documentation must be reviewed and assured the text matches the example.

I can see why most of the tests are failing, and I have a little more cleanup to do, before this is really ready for review.

Okay comments addressed....
Paul, I will try to "download" your branch and see what happens to the ADET.
Andrea

In my estimation, this is the minimum size of PR necessary to rework and restore the existing functionality of the Optimizer class without many months of careful, piecewise adjustment in ways compatible both with the old and new sufficient to only replace parts of the system at once. I'm not aware of any way to do this without rather large amounts of changes.

Job Test Fedora 29 on c3e3c68 : invalidated by @joshua-cogliati-inl
kill on machine, not for problem

@PaulTalbot-INL @wangcj05 can we merge this? If so, can we "summurize" in an issue or so what the "remaining" comments to address are?

I think we've made issues of all of CongJian's comments, based on our last standup discussion. I believe this is ready to merge.

This PR is good to me, but a more specific issue should be opened, not #867. In addition, an email should be proposed  regarding the significant changes in optimizations. @PaulTalbot-INL @alfoa

@wangcj05 should be the "Merger" since i added a modification

Before merge it, I have last comment (see above).

Please be specific; in our last standup you indicated that the LSS issue was the only one that needed adding. I can add any number of issues for you, I just need to know which ones you believe are insufficiently covered in the current issue list.
Also, adding issues has not traditionally been a reason to hold back a merge, but at your discretion of course.

If you check the issue #867, it is about "Function" variables in Optimize. This issue can not reflect the changes in this PR. What I mean is to create a more informative issue for this PR to describe the significant changes in this PR. In addition, an email should also be proposed.

I have begun working on an email; I will have a draft ready shortly.

RAVEN Optimizer Users:
Since adding Optimization to the features of RAVEN, the breadth and scope of workflows using it have grown quickly, and have necessitated a rework of the original implementation. As of PR #1163, this rework is complete, and future pulls from devel and future stable releases will include the rework.
These changes do require some changes to the <Optimizer> block in RAVEN input files that are not readily performed via script. There are several examples covering major features in raven/tests/framework/Optimizer/GradientDescent to guide changes to existing workflows. In addition, we would be happy to help transition to the new input block to recover the same behavior as before this change.
We hope you will find this new Optimizer intuitive to use, and enjoy the many new features coming in the pipeline as a result of this rework. Let us know if we can help smooth over any bumps in the transition!
Thank you,
The RAVEN Development Team

I added all the issues that can relete to this PR + a general one regarding the restructuring...

@wangcj05 this is ready to be merged whenever you want

Good to me.

Checklists are satisfied, and this PR can be merged.

@PaulTalbot-INL This PR is merged, could you send out the email to users?


Updated Aphid init to use host and port

Possibly fixes issue #22 ?

Hi @errolc - can you please fill out the following CLA?
<EMAIL_ADDRESS>

done.


Same name for interface and class, which should be not allowed

TypeScript Version:  2.0.3
Code
interface Person {
  say(): void;
}

class Person {

}

class Country {
  president: Person;
}

const country = new Country();
country.president = new Person;

country.president.say();

There should be warning or error that same name was used for interface and class.
Now it compiles without any error, but fails on runtime with: no such method.
Sure, i just can add I prefix for all interfaces, but will be great to catch this on compilation.

it's a very interesting situation, what happens is the interface Person is progressively defined in 2 places, that is it has 2 definitions (one from class, one from interface) that are merged, so it's kind of a feature of TypeScript (very useful at  times), not sure if it needs to be fixed, however i see your frustration

This is intentional -- it's how you declare additional methods on a class. It's necessary to be able to do this because some libraries (not naming names) simply mutate existing class prototypes to expose their functionality.


[BUG] Teams are still there after uninstalling plugin

Describe the bug
The teams are still there but I've uninstalled the plugin.
To Reproduce
Steps to reproduce the behaviour:

Install plugin
Setup teams
Uninstall pluing
Restart server

Expected behaviour
Teams shoul have been cleared.
Screenshots

Details
Please provide the following details about your server set-up:

Spigot version (found by running /version):
This server is running Paper version git-Paper-381 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT) (Git: db0bff9)
You are 3 version(s) behind
Download the new version at: https://papermc.io/downloads
Previous version: git-Paper-788 (MC: 1.16.5)
BetterTeams version (found by running /version BetterTeams):
BetterTeams-4.1.4

Additional context
If I use command /team list I get no output.

how do you confirm that better teams are still there?

If you look at the attached picture you can see the red word "Bot" near the third player.
That is a team made wit BetterTeam when the plugin was installed.

well, we can't say by looking that.
there might be 2 reasons:
1 You didn't remove BetterTeams properly
2 or another plugin might be interfering it!
check once more, or make a back-up and try removing the plugins one by one to see which one causing the issue!

I went through the same thing.
Occurs when the team is deleted and re-created with the same name.

This bug has been fixed and the patch will be included in the next update. Thank you for reporting.