You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@senssoft.apache.org by "Joshua Poore (JIRA)" <ji...@apache.org> on 2019/02/23 03:10:00 UTC

[jira] [Commented] (SENSSOFT-323) Update to Gulp 4.0.0

    [ https://issues.apache.org/jira/browse/SENSSOFT-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16775768#comment-16775768 ] 

Joshua Poore commented on SENSSOFT-323:
---------------------------------------

Eureka! Some stupid parens were making life irritating!

I have a build solution running, all userale artifacts are building and tests are running as expected.

Only nit is that Gulp 4 is pushing for an entire re-write to the Gulp File so that named functions are specified after vars, following gulp.task procedural logic. Passing our code, which embeds the functions in gulp.task, through Gulp 4 results in the console logging a lot of "anonymous" tasks. This happens every time we run a series within gulp task (see below). I'll write another ticket to modify our gulpfile to the new schema, but this is purely cosmetic (low priority):
{code:java}
[21:47:53] Using gulpfile ~/Documents/Apache_SensSoft/dev/incubator-senssoft-useralejs-SENSSOFT-323/gulpfile.js
[21:47:53] Starting 'test'...
[21:47:53] Starting 'build'...
[21:47:53] Starting 'rollup'...
[21:47:53] Finished 'rollup' after 82 ms
[21:47:53] Starting 'build-web-ext'...
[21:47:53] Starting 'rollup-web-ext-content'...
[21:47:53] Finished 'rollup-web-ext-content' after 61 ms
[21:47:53] Starting 'rollup-web-ext-background'...
[21:47:54] Finished 'rollup-web-ext-background' after 31 ms
[21:47:54] Starting 'rollup-web-ext-options'...
[21:47:54] Finished 'rollup-web-ext-options' after 4.98 ms
[21:47:54] Starting '<anonymous>'...
[21:47:54] Finished '<anonymous>' after 33 ms
[21:47:54] Finished 'build-web-ext' after 131 ms
[21:47:54] Starting '<anonymous>'...
[21:47:54] Finished '<anonymous>' after 261 ms
[21:47:54] Finished 'build' after 476 ms
[21:47:54] Starting 'lint'...
[21:47:54] Finished 'lint' after 345 ms
[21:47:54] Starting '<anonymous>'...

  attachHandlers

    ✓ attaches all the event handlers without duplicates

    ✓ debounces bufferedEvents (507ms)

    defineDetails

      - configures high detail events correctly

  configure

    ✓ merges new configs into main config object

    ✓ includes a userid if present in the window.location

    getUserIdFromParams

      ✓ fetches userId from URL params

      ✓ returns null if no matching param

  getInitialSettings

    timeStampScale

      ✓ no event.timestamp

      ✓ zero

      ✓ epoch milliseconds

      ✓ epoch microseconds

      ✓ performance navigation time

    getInitialSettings

      ✓ fetches all settings from a script tag (99ms)

      ✓ grabs user id from params

  Userale API

    ✓ provides configs

    ✓ edits configs

    ✓ starts + stops (212ms)

    ✓ sends custom logs

  packageLogs

    setLogFilter

      ✓ assigns the handler to the provided value

      ✓ allows the handler to be nulled

    setLogMapper

      ✓ assigns the handler to the provided value

      ✓ allows the handler to be nulled

    packageLog

      ✓ only executes if on

      ✓ calls detailFcn with the event as an argument if provided

      ✓ packages logs

      ✓ filters logs when a handler is assigned and returns false

      ✓ assigns logs to the mapper's return value if a handler is assigned

      ✓ does not call the map handler if the log is filtered out

      ✓ does not attempt to call a non-function filter/mapper

    extractTimeFields

      ✓ returns the millisecond and microsecond portions of a timestamp

      ✓ sets micro to 0 when no decimal is present

      ✓ always returns an object

    getLocation

      ✓ returns event page location

      ✓ calculates page location if unavailable

      ✓ fails to null

    selectorizePath

      ✓ returns a new array of the same length provided

    getSelector

      ✓ builds a selector

      ✓ identifies window

      ✓ handles a non-null unknown value

    buildPath

      ✓ builds a path

      ✓ defaults to path if available

  sendLogs

    ✓ sends logs on an interval

    ✓ does not send logs if the config is off

    ✓ sends logs on page exit with navigator

    ✓ sends logs on page exit without navigator

    ✓ does not send logs on page exit if config is off

45 passing (948ms)

1 pending
{code}

> Update to Gulp 4.0.0
> --------------------
>
>                 Key: SENSSOFT-323
>                 URL: https://issues.apache.org/jira/browse/SENSSOFT-323
>             Project: SensSoft
>          Issue Type: Bug
>          Components: UserALE.js
>    Affects Versions: UserALE.js 1.1.0
>         Environment: NPM, Node.js
>            Reporter: Joshua Poore
>            Assignee: Joshua Poore
>            Priority: Blocker
>             Fix For: UserALE.js 1.0.0, UserALE.js 1.1.0
>
>
> Gulp 3.9.1 is deprecated and has vulnerable dependencies (which are also deprecated). Gulp 4 solves all these issues. However, it has breaking changes with new syntax and new dependences (e.g., moves away from gulp-utilities).
> Some relevant refs:
> [https://gist.github.com/jeromecoupe/0b807b0c1050647eb340360902c3203a]
> [https://www.npmjs.com/package/gulplog]
> [https://gulpjs.org/recipes/mocha-test-runner-with-gulp.html]
> [https://www.npmjs.com/package/gulp-mocha]
> [https://github.com/mochajs/mocha/tree/master/lib/reporters]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)