From 8346f467bec2d93c79851de4a5dfe4135b90c3c4 Mon Sep 17 00:00:00 2001 From: Jake Champion Date: Tue, 15 Aug 2017 15:32:29 +0100 Subject: [PATCH] we no longer compile node modules deps --- package-lock.json | 1 - package.json | 2 ++ test/integration/build/build.test.js | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4a3702ce..164da3c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2,7 +2,6 @@ "name": "origami-build-tools", "version": "0.0.0", "lockfileVersion": 1, - "requires": true, "dependencies": { "abbrev": { "version": "1.1.0", diff --git a/package.json b/package.json index 726ae405..edc176d9 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,8 @@ "eslint-plugin-promise": "^3.5.0", "expect.js": "^0.3.1", "is-es5-syntax": "^1.0.1", + "is-es6-syntax": "^1.0.1", + "is-es7-syntax": "^1.0.0", "merge-deep": "^3.0.0", "mocha": "^3.0.2", "mockery": "^2.0.0", diff --git a/test/integration/build/build.test.js b/test/integration/build/build.test.js index 971aa68f..05007713 100644 --- a/test/integration/build/build.test.js +++ b/test/integration/build/build.test.js @@ -11,6 +11,8 @@ const rimraf = require('../helpers/delete'); const vm = require('vm'); const fs = require('fs'); const isEs5 = require('is-es5-syntax'); +const isEs6 = require('is-es6-syntax'); +const isEs7 = require('is-es7-syntax'); const currentVersion = require('node-version'); describe('obt build', function () { @@ -248,7 +250,7 @@ describe('obt build', function () { .then(() => process.chdir(process.cwd())); }); - it('should compile the dependency js using babel', function () { + it('should not compile the dependency js using babel', function () { let obt; return obtBinPath() .then(obtPath => { @@ -267,7 +269,9 @@ describe('obt build', function () { .then(() => { const code = fs.readFileSync('build/main.js', 'utf-8'); - proclaim.isTrue(isEs5(code)); + proclaim.isFalse(isEs5(code)); + proclaim.isFalse(isEs6(code)); + proclaim.isTrue(isEs7(code)); if (currentVersion.major >= 7) { const sandbox = {};