Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: apollographql/graphql-tag
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.11.0
Choose a base ref
...
head repository: apollographql/graphql-tag
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.12.0
Choose a head ref
  • 10 commits
  • 18 files changed
  • 3 contributors

Commits on Jan 19, 2021

  1. Rename graphql-js to graphql (#318)

    graphql-js returns 404 on npm: http://npmjs.com/package/graphql-js
    penx authored Jan 19, 2021
    Copy the full SHA
    292bb8f View commit details

Commits on Jan 29, 2021

  1. Set up GitHub Actions.

    benjamn authored Jan 29, 2021
    Copy the full SHA
    aa9c5c9 View commit details
  2. Copy the full SHA
    e06bd06 View commit details
  3. Implement ES6 export file

    This upgrade all dev dependencies in order to implement ES6 exports
    in order to solve #303.
    
    This also remove yarn.lock entirely because this package is meant to
    work with npm only as can be seen from the mention of npm command in
    package.json.
    
    Fixes #303
    Closes #272
    Closes #273
    PowerKiKi authored and benjamn committed Jan 29, 2021
    Copy the full SHA
    9558fe3 View commit details
  4. Convert repo to TypeScript.

    The loader.js module is still CommonJS, since that's what webpack wants,
    and importing the package with require("graphql-tag") still returns the
    gql function, rather than an exports object, for backwards compatibility.
    
    I converted the tests to TypeScript, since the type checking is useful for
    test code. Mocha now runs a CommonJS test bundle generated by Rollup.
    benjamn committed Jan 29, 2021
    Copy the full SHA
    159979b View commit details
  5. Copy the full SHA
    1dc4a23 View commit details
  6. Mention PR #325 in CHANGELOG.md.

    benjamn committed Jan 29, 2021
    Copy the full SHA
    bfe5a61 View commit details
  7. Merge pull request #325 from PowerKiKi/master

    Convert project to TypeScript, providing ECMAScript as well as CommonJS exports.
    benjamn authored Jan 29, 2021
    Copy the full SHA
    a9e1cc9 View commit details
  8. 1
    Copy the full SHA
    1809a56 View commit details
  9. Bump npm version to 2.12.0.

    benjamn committed Jan 29, 2021
    Copy the full SHA
    a9f689a View commit details
Showing with 3,435 additions and 2,701 deletions.
  1. +0 −3 .babelrc
  2. +9 −0 .github/dependabot.yml
  3. +29 −0 .github/workflows/node.js.yml
  4. +0 −5 .travis.yml
  5. +5 −0 CHANGELOG.md
  6. +1 −1 README.md
  7. +0 −20 index.d.ts
  8. +1 −1 loader.js
  9. +3 −0 main.js
  10. +3,087 −1,102 package-lock.json
  11. +26 −15 package.json
  12. +47 −16 rollup.config.js
  13. +0 −180 src/index.js
  14. +160 −0 src/index.ts
  15. +46 −41 test/graphql.js → src/tests.ts
  16. +0 −1 test/mocha.opts
  17. +21 −0 tsconfig.json
  18. +0 −1,316 yarn.lock
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm"
directory: "/" # Location of package manifests
schedule:
interval: "daily"
29 changes: 29 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change log

### v2.12.0

* The `graphql-tag` repository has been converted to TypeScript, adding type safety and enabling both ECMAScript and CommonJS module exports. While these changes are intended to be as backwards-compatible as possible, we decided to bump the minor version to reflect the significant refactoring. <br/>
[@PowerKiKi](http://github.com/PowerKiKi) and [@benjamn](http://github.com/benjamn) in [#325](https://github.com/apollographql/graphql-tag/pull/325)

### v2.11.0 (2020-07-28)

* `package.json` `sideEffects` changes to clearly identify that `graphql-tag` doesn't have side effects. <br/>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ Helpful utilities for parsing GraphQL queries. Includes:
- `gql` A JavaScript template literal tag that parses GraphQL query strings into the standard GraphQL AST.
- `/loader` A webpack loader to preprocess queries

`graphql-tag` uses [the reference `graphql` library](https://github.com/graphql/graphql-js) under the hood as a peer dependency, so in addition to installing this module, you'll also have to install `graphql-js`.
`graphql-tag` uses [the reference `graphql` library](https://github.com/graphql/graphql-js) under the hood as a peer dependency, so in addition to installing this module, you'll also have to install `graphql`.

### gql

20 changes: 0 additions & 20 deletions index.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion loader.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

const os = require('os');
const gql = require('./src');
const gql = require('./main.js');

// Takes `source` (the source GraphQL query string)
// and `doc` (the parsed GraphQL document) and tacks on
3 changes: 3 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// For backwards compatibility, make sure require("graphql-tag") returns
// the gql function, rather than an exports object.
module.exports = require('./lib/graphql-tag.umd.js').gql;
Loading