Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Support native ESM via .mjs. #433

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Commits on May 2, 2018

  1. Support native ESM via .mjs.

    Relates to graphql#425.
    
    - Swapped deprecated babel-preset-es2015 for babel-preset-env.
    - Added package.json engines field.
    - Configured babel-preset-env to target the Node.js version defined in package.json engines field.
    - Kept Babel at v6, but moved config into a v7 ready .babelrc.js file for dynamic config via env.
    - Tidied the package.json scripts, added an ESM build step that generates .mjs dist files. Follow the lead of graphql/graphql-js#1244, although I do things quite different for my own projects with Babel v7.
    - Updated package.json main field for ESM/CJS cross compatibility.
    - Added a package.json module field for tree-shaking bundlers.
    jaydenseric committed May 2, 2018
    Configuration menu
    Copy the full SHA
    890fc03 View commit details
    Browse the repository at this point in the history
  2. Fix test transpilation.

    jaydenseric committed May 2, 2018
    Configuration menu
    Copy the full SHA
    f2adf5b View commit details
    Browse the repository at this point in the history
  3. Fix index ESM exports.

    This one needs careful consideration.
    jaydenseric committed May 2, 2018
    Configuration menu
    Copy the full SHA
    28cace0 View commit details
    Browse the repository at this point in the history

Commits on May 7, 2018

  1. Removed default export for cross-compatible ESM/CJS named exports.

    This is a nesesary breaking change. This is consistent with the graphql package, which only has named exports.
    jaydenseric committed May 7, 2018
    Configuration menu
    Copy the full SHA
    cb84e76 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' of https://github.com/graphql/express-graphql i…

    …nto mjs
    
    # Conflicts:
    #	src/__tests__/usage-test.js
    jaydenseric committed May 7, 2018
    Configuration menu
    Copy the full SHA
    e463240 View commit details
    Browse the repository at this point in the history
  3. Update Node.js support to v6+.

    - Configured Travis to test on the latest stable Node.js version (v9-10+ were not being tested!), and the lowest supported version which is now v6. Removed unessesary versions in between.
    - Updated package.json engines field, which in turn updates transpilation via dynamic Babel preset-env config.
    jaydenseric committed May 7, 2018
    Configuration menu
    Copy the full SHA
    a5d02db View commit details
    Browse the repository at this point in the history