@stepzen/transpiler 0.0.27 → 0.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,7 @@ exports.default = async (source, options = {
20
20
  const stitched = stitch_1.default(source);
21
21
  const index = path.join(stitched, 'index.graphql');
22
22
  const graphql = fs.readFileSync(index, 'utf8');
23
- const tmp = path.join(os.tmpdir(), 'stepzen-lint-${Date.now()}');
23
+ const tmp = path.join(os.tmpdir(), `stepzen-lint-${Date.now()}`);
24
24
  fs.ensureDirSync(tmp);
25
25
  const lintFile = path.join(tmp, 'index.graphql');
26
26
  fs.writeFileSync(lintFile, `${extensions}${os.EOL}${os.EOL}${graphql}`);
@@ -8,7 +8,7 @@ const os = require("os");
8
8
  const path = require("path");
9
9
  const prettier = require("prettier");
10
10
  const dedupe_query_and_mutation_types_1 = require("../utils/dedupe-query-and-mutation-types");
11
- exports.default = (source, output = path.join(os.tmpdir(), 'stepzen-tmp-${Date.now()}')) => {
11
+ exports.default = (source, output = path.join(os.tmpdir(), `stepzen-tmp-${Date.now()}`)) => {
12
12
  // Ensure source and output directories exist
13
13
  if (!fs.existsSync(source))
14
14
  throw new Error(`Cannot find source directory ${source}`);
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const graphql_1 = require("graphql");
4
4
  const fs = require("fs-extra");
5
+ const os = require("os");
5
6
  const path = require("path");
6
7
  const ensure_query_and_mutation_types_1 = require("../utils/ensure-query-and-mutation-types");
7
8
  const constants_1 = require("../utils/constants");
@@ -21,7 +22,7 @@ exports.default = (source, options = {
21
22
  const file = path.join(source, 'index.graphql');
22
23
  const index = fs.readFileSync(file, "utf8");
23
24
  // Parse
24
- let ast = graphql_1.parse(`${constants_1.EXPERIMENTAL_EXTENSIONS}\n${options.extensions}\n${index}`, {
25
+ let ast = graphql_1.parse(`${constants_1.EXPERIMENTAL_EXTENSIONS}${os.EOL}${options.extensions}${os.EOL}${index}`, {
25
26
  noLocation: true,
26
27
  });
27
28
  // We make an exception for 'no type Query' or 'no type Mutation'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stepzen/transpiler",
3
3
  "description": "The StepZen transpiler",
4
- "version": "0.0.27",
4
+ "version": "0.0.28",
5
5
  "author": "Darren Waddell <darren@stepzen.com>",
6
6
  "license": "MIT",
7
7
  "files": [