Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add global jsonrpc ref for umd bundle and fix webpack warning #17

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

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
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
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
3 participants