profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/ftaiolivista/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Fabiano Taioli ftaiolivista Vista Tecnologie Ravenna, Italy vista.it

ftaiolivista/Grails-PHP 3

Grails plugin for PHP Quercus integration

ftaiolivista/browser-detection 1

Grails plugin for analyzing request headers: browser, operating system, language and etc

ftaiolivista/doctrine2 1

Doctrine 2 Object Relational Mapper

ftaiolivista/doctrine2-nestedset-deep 1

A NestedSet extension for Doctrine2

ftaiolivista/filer.js 1

A wrapper library for the HTML5 Filesystem API what reuses UNIX commands (cp, mv, ls) for its API.

ftaiolivista/grails-functional-test 1

Grails Functional Test Plugin

ftaiolivista/Grails-Qr-Code-Plugin 1

Grails QrCode plugin. Fork from work by Shawn Hartsock

ftaiolivista/grails-qrcode 1

The Grails QR Code plugin

ftaiolivista/activiti-demo 0

Spins up a VM with Tomcat and Activiti

issue commentmaterial-components/material-components-web

[checkbox] sass compilation error with last sass "sass@1.40.0"

This may break your stylesheets, but only if they were already producing broken CSS.

ftaiolivista

comment created time in 6 days

issue openedmaterial-components/material-components-web

[checkbox] sass compilation error with last sass "sass@1.40.0"

sass --style=expanded --load-path=../node_modules --load-path=/home/vista/dev/iter-mono/iter-web/app/styles --load-path=/home/vista/dev/iter-mono/iter-web --load-path=/home/vista/dev/iter-mono/iter-web/node_modules app/styles/index.scss
Error: Expected "(" or ".".
    ╷
329 │   $checkbox-padding: calc((_ripple-size - _icon-size) / 2);
    │                                        ^
    ╵
  ../node_modules/@material/checkbox/_checkbox-theme.scss 329:40  @use
  ../node_modules/@material/checkbox/_checkbox.scss 42:1          @forward
  ../node_modules/@material/checkbox/_variables.scss 24:1         @forward
  @material/_index.scss 1:1                                       @use
  @vista/iter-theme/app/styles/main.scss 16:1                     @import

created time in 7 days

issue commentstaltz/xstream

Better debug in javascript

agree with you about performance. Filter out null probably will make things harder to debug. Maybe the possibility to run xstream in two flavors? with lite typecheck and without, something like sanctuary?

ftaiolivista

comment created time in 14 days

issue openedstaltz/xstream

Better debug in javascript

When working in Js without Typescript help the lib don't warn you when passing bad values to stream constructor

A classic example is merging or composing null values:

const stream1 = xs.never() const stream2 = xs.never() const stream3 = null xs.merge(stream1, stream2, stream3)

The code don't give error on network setup but only at network run time without telling where the the problem came for.

Would not be bad to add a lite type check on merge and combine, something like var Merge = /** @class */ (function () { function Merge(insArr) { // Are all operand streams? for (const v of insArr) { if (!v || !v._add) { throw Error('Must be a Stream') } } //================= this.type = 'merge'; this.insArr = insArr; this.out = NO; this.ac = 0; }

created time in 14 days

issue commentnwjs/nw.js

Lost local data on NWJS upgrade

After mode checks I found that the two apps build results in two different chrome.runtime.id.

But my manifest "key" was not changed .

ftaiolivista

comment created time in 15 days

issue openednwjs/nw.js

Lost local data on NWJS upgrade

I have upgrade an NWJS App that was build as chrome-app with NWJS version 0.37.3 to NWJS version 0.53.0.

All was ok except that when update the app on a MAC the new App dont find and use old app local data.

If I reinstalled the old app, the app find again old data but not new data so I think that the two version are using different local data folder, but if I check nw.App.dataPath from the applications they point to the same data folder /User/<user>/Library/Application Support/<My app name>/Default".

The app manifest ID is not changed.

What am I missing?

created time in 17 days

issue commentrollup/plugins

Undefined exported __moduleExports

The problem still exists in snowpack using plugin-commonjs@16.0.0

Some deps use import with .default creating problems.

I solved patching plugin-commonjs@16.0.0 to always set default to the namespace when ther is not allready a default defined.

diff --git a/node_modules/@rollup/plugin-commonjs/dist/index.js b/node_modules/@rollup/plugin-commonjs/dist/index.js
index 32dd0de..e271a8a 100644
--- a/node_modules/@rollup/plugin-commonjs/dist/index.js
+++ b/node_modules/@rollup/plugin-commonjs/dist/index.js
@@ -55,7 +55,9 @@ const HELPERS = `
 export var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
 
 export function getDefaultExportFromCjs (x) {
-	return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
+    return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ?
+        (x['default'].default = x.default, x['default'])
+        : x;
 }
 
 export function createCommonjsModule(fn, basedir, module) {

FbN

comment created time in 19 days

issue openedSeyZ/jsonapi-serializer

would not be nice to have a generic valueForRelationship?

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch jsonapi-serializer@3.6.7 for the project I'm working on.

Currently I have to declare valueForRelationship for every relationship but many times the function must be applied to all entities so could be nice to have the possibility to declare a general valueForRelationship tha can be replaced per specific relationship.

Here is the diff that solved my problem:

diff --git a/node_modules/jsonapi-serializer/lib/deserializer-utils.js b/node_modules/jsonapi-serializer/lib/deserializer-utils.js
index 1265fd4..b63e3e6 100644
--- a/node_modules/jsonapi-serializer/lib/deserializer-utils.js
+++ b/node_modules/jsonapi-serializer/lib/deserializer-utils.js
@@ -14,9 +14,9 @@ module.exports = function (jsonapi, data, opts) {
   }
 
   function getValueForRelationship(relationshipData, included) {
-    if (opts && relationshipData && opts[relationshipData.type]) {
-      var valueForRelationshipFct = opts[relationshipData.type]
-        .valueForRelationship;
+    if (opts && relationshipData && (opts[relationshipData.type] || opts.valueForRelationship)) {
+      var valueForRelationshipFct =
+        opts[relationshipData.type]?.valueForRelationship || opts.valueForRelationship;
 
       return valueForRelationshipFct(relationshipData, included);
     } else {

<em>This issue body was partially generated by patch-package.</em>

created time in a month

fork ftaiolivista/jsonapi-serializer

A Node.js framework agnostic library for (de)serializing your data to JSON API

fork in a month

issue commentcalmm-js/partial.lenses

Optic doesn't support Symbol.

If someone, like me, needs to not loose Symbols using lenses this a patch I have done to infestines.


diff --git a/node_modules/infestines/dist/infestines.cjs.js b/node_modules/infestines/dist/infestines.cjs.js
index 3d711b4..a1a4f30 100644
--- a/node_modules/infestines/dist/infestines.cjs.js
+++ b/node_modules/infestines/dist/infestines.cjs.js
@@ -438,14 +438,8 @@ var assocPartialU = function assocPartial(k, v, o) {
   var r = {};
   if (o instanceof Object) {
     if (!isObject(o)) o = toObject(o);
-    for (var l in o) {
-      if (l !== k) {
-        r[l] = o[l];
-      } else {
-        r[k] = v;
-        k = void 0;
-      }
-    }
+    // Symbol Support
+    Object.assign(r, o);
   }
   if (isDefined(k)) r[k] = v;
   return r;
@@ -456,10 +450,9 @@ var dissocPartialU = function dissocPartial(k, o) {
   if (o instanceof Object) {
     if (!isObject(o)) o = toObject(o);
     for (var l in o) {
-      if (l !== k) {
-        if (!r) r = {};
-        r[l] = o[l];
-      } else {
+      // Symbol Support
+      if (!r) {r = {...o}}
+      if (l === k) {
         k = void 0;
       }
     }

polymona

comment created time in a month

startednode-loader/node-loader-import-maps

started time in a month

starteduwu-tech/Kind

started time in a month

fork ftaiolivista/prettier-eslint

Code :arrow_right: prettier :arrow_right: eslint --fix :arrow_right: Formatted Code :sparkles:

http://npm.im/prettier-eslint

fork in 2 months

push eventftaiolivista/json-schema-to-typescript

Fabiano Taioli

commit sha d65261bb71258fcf50025c72a9b00e92323ad79c

deps upgrade

view details

push time in 2 months

startedtamasfe/json-schema-to-typescript

started time in 2 months

startednoxasch/gulp-best-rollup-2

started time in 2 months

startedalexandermckay/readable-curried-functions

started time in 2 months

startedgajus/slonik

started time in 2 months

issue openedimport-js/eslint-plugin-import

Make optional reporting of "import/export: Multiple exports of name ..."

Multiple exports of name is always reported as an error but it's a legitimate feature disciplined by ECMASCRIPT specs.

Es:

// D.js 
const f = () => 'D::f'
export { f }

// E.js
export * from './D.js'
const f = () => 'E::f'
export { f }

Report -> import/export: Multiple exports of name 'f'.

Maybe eslint-plugin-import could give an optionable error that can ben disabled by config?

See also here and #1704

created time in 2 months

issue commentbenmosher/eslint-plugin-import

import/export - Multiple exports triggered when duplication isn't relevant

I think the export overloading is ammisible by ECMASCRIPT (see this answer https://stackoverflow.com/questions/66533367/import-export-name-collision-resolution )

Maybe eslint could give an optionable error that can ben disabled by config?

tomprats

comment created time in 2 months

issue commentbenmosher/eslint-plugin-import

import/export - Multiple exports triggered when duplication isn't relevant

Still getting this error on v 2.23.4

// D.js 
const f = () => 'D::f'
export { f }

// E.js
export * from './D.js'
const f = () => 'E::f'
export { f }

-> import/export: Multiple exports of name 'f'.

tomprats

comment created time in 2 months

issue closedfluture-js/Fluture

Async Iterators

I was trining to figure how to implement with Fluture an asyncronous iterator.

For example take this csv parsing code (source):

const assert = require('assert');
const generate = require('csv-generate');
const parse = require('csv-parse')

(async () => {
  // Initialise the parser by generating random records
  const parser = generate({
    high_water_mark: 64 * 64,
    length: 100
  }).pipe(
    parse()
  )
  // Intialise count
  let count = 0;
  // Report start
  process.stdout.write('start\n')
  // Iterate through each records
  for await (const record of parser) {
    // Report current line
    process.stdout.write(`${count++} ${record.join(',')}\n`)
    // Fake asynchronous operation
    await new Promise((resolve) => setTimeout(resolve, 100))
  }
  // Report end
  process.stdout.write('...done\n')
  // Validation
  assert.strictEqual(count, 100)
})()

How do you convert this to Fluture? I mean, I dont want to wrap all the code with an attempP but obtain a Future that parse single records to chain other elaboration to it

closed time in 2 months

ftaiolivista

issue commentfluture-js/Fluture

Async Iterators

Do you think could be possibile (and useful) to implement a method like 'go' in Fluture to work with async generator?

ftaiolivista

comment created time in 2 months

startedfrancisrstokes/Lazy-Infinite-List

started time in 2 months

issue commentfluture-js/Fluture

Async Iterators

@Avaq got it working this way. The problem is that I have one last future with undefined value because the Infinite loop cancellation happen after one last promise with undefined value

import { S, F } from './src/lib.js' // S = sanctuary F = Fluture
import { createReadStream, promises as FS } from 'fs'
import parse from 'csv-parse'
import Infinite from 'lazy-infinite'

const parsing = createReadStream('file.csv').pipe(parse())

const infinite = asynciterable =>
    Infinite.of(function * () {
        const i = asynciterable[Symbol.asyncIterator]()
        let goon = true
        do {
            yield F.attemptP(() =>
                i.next().then(({ done, value }) => {
                    goon = !done
                    return done ? undefined : value
                })
            )
        } while (goon)
    })

S.pipe([
    infinite,
    F.map(
        F.chain(v => {
            console.log('process', v)
            return F.after(2000)(v)
        })
    ),
    i => F.go(i.gen),
    F.fork(err => console.error('err', err))(console.log)
])(parsing)

ftaiolivista

comment created time in 2 months

issue commentfluture-js/Fluture

Async Iterators

Thank you @Avaq for the quick reply. Looked ad #478. Looks clear how to wrap a standard generator with Lazy List but not clear to me on how to wrap an async iterator that yield promises.

ftaiolivista

comment created time in 2 months

startedbenji6/imlazy

started time in 2 months

issue openedfluture-js/Fluture

Async Iterators

I was trining to figure how to implement with Fluture an asyncronous iterator.

For example take this csv parsing code (source):

onst assert = require('assert'); const generate = require('csv-generate'); const parse = require('csv-parse')


(async () => {
  // Initialise the parser by generating random records
  const parser = generate({
    high_water_mark: 64 * 64,
    length: 100
  }).pipe(
    parse()
  )
  // Intialise count
  let count = 0;
  // Report start
  process.stdout.write('start\n')
  // Iterate through each records
  for await (const record of parser) {
    // Report current line
    process.stdout.write(`${count++} ${record.join(',')}\n`)
    // Fake asynchronous operation
    await new Promise((resolve) => setTimeout(resolve, 100))
  }
  // Report end
  process.stdout.write('...done\n')
  // Validation
  assert.strictEqual(count, 100)
})()

How does do you convert this to Fluture?

created time in 2 months