Skip to content

Conversation

@antongolub
Copy link
Contributor

@antongolub antongolub commented Oct 28, 2019

closes #15
closes #16

@zensh, could you review this PR?

@antongolub
Copy link
Contributor Author

There's a bit trouble: microbundle > rollup-plugin-alias > slash "^3.0.0" that requires node >=8.

@zensh
Copy link
Collaborator

zensh commented Oct 29, 2019

@antongolub Could you remove microbundle ?

@antongolub
Copy link
Contributor Author

Oh... build task requires microbundle to produce the all variety of packages: .js, .mjs, .umd.js and its maps. I'll try to separate build and test stages and assign proper runtime versions for each of them.

@antongolub antongolub force-pushed the master branch 16 times, most recently from 2c6ce12 to e15cf27 Compare October 29, 2019 14:43
@antongolub
Copy link
Contributor Author

antongolub commented Oct 29, 2019

Travis-ci has ability to cache directories between jobs/stages. But I cannot to make this feature work(
This is very similar to issue #9814

Here's the config:

language: node_js
sudo: false

install: skip
before_install: skip
before_script: skip
script: skip

cache:
  directories:
    - ./target
    - target
    - node_modules

stages:
  - build
  - test

jobs:
  include:
    - stage: build
      node_js:
        - "12"
      install:
        - yarn install
        - yarn build
      script: skip
    - stage: test
      node_js:
        - "6"
        - "8"
        - "10"
        - "12"
        - "13"
      install: skip
      before_install: skip
      before_script: skip
      script:
        - yarn test

build stage adds files to target dir, but store build cache finds that "nothing changed" 604485316. So the next test stage outputs:

/home/travis/build/teambition/jsonrpc-lite/target
/home/travis/build/teambition/jsonrpc-lite/target is not yet cached

Any thoughts?

@antongolub antongolub force-pushed the master branch 4 times, most recently from bf1ba69 to c3063d0 Compare October 29, 2019 16:06
@antongolub
Copy link
Contributor Author

"There is one cache per branch and language version" #caches-and-build-matrices
@zensh, it seems there's no easy way to share target from nodejs_8 build stage for nodejs_6 test suite.

@antongolub antongolub force-pushed the master branch 2 times, most recently from a94df8e to d2b57f6 Compare October 30, 2019 06:10
@antongolub
Copy link
Contributor Author

antongolub commented Oct 30, 2019

@zensh And finally it works. I just raise NodeJs version at the build stage and return it back after. So the test validates bundles against v6.

install:
  - 'if [ "${TRAVIS_NODE_VERSION}" = "6" ] ; then nvm use 8 ; fi ;'
  - yarn install
  - yarn build
  - 'if [ "${TRAVIS_NODE_VERSION}" = "6" ] ; then nvm use "${TRAVIS_NODE_VERSION}" && node --version ; fi ;'

script:
  - yarn test

@antongolub
Copy link
Contributor Author

@zensh, any objections?

@zensh
Copy link
Collaborator

zensh commented Nov 10, 2019

@antongolub Hi, I don't like microbundle.

@antongolub
Copy link
Contributor Author

Ok... I'll try find another solution, but not right now.

@antongolub
Copy link
Contributor Author

antongolub commented Nov 18, 2019

@zensh, I've replaced microbundle with several tsc scripts, amd and global polyfills.

@kyranjamie
Copy link

What's the latest here? Anything stopping this PR getting merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jsonrpc.js doesn't create global variable jsonrpc in browser Warning 2.1.0: Critical dependency: require function is used in a way

3 participants