From 805cd2cc1499c63f03467c6c1939ca2f7b61c9a4 Mon Sep 17 00:00:00 2001 From: Joshua Wiens Date: Fri, 24 Feb 2017 23:58:58 -0600 Subject: [PATCH 1/4] ci(Travis): adds travis build --- .travis.yml | 34 ++++++++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e02c623 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,34 @@ +# Tasks are commented out purposfully. Will be uncommented for webpack-defaults application +sudo: false +language: node_js +branches: + only: + - master +matrix: + fast_finish: true + include: + - os: linux + node_js: '6' + env: WEBPACK_VERSION="2.2.0" JOB_PART=test + - os: linux + node_js: '4.3' + env: WEBPACK_VERSION="2.2.0" JOB_PART=test + - os: linux + node_js: '7' + env: WEBPACK_VERSION="2.2.0" JOB_PART=test + # - os: linux + # node_js: '7' + # env: WEBPACK_VERSION="2.2.0" BITHOUND_CHECK=true JOB_PART=lint + # - os: linux + # node_js: '7' + # env: WEBPACK_VERSION="2.2.0" JOB_PART=coverage +before_install: + - nvm --version + - node --version +before_script: + - if [ "$WEBPACK_VERSION" ]; then yarn add webpack@^$WEBPACK_VERSION; fi + # - if [ "$BITHOUND_CHECK" ]; then npm install -g bithound; bithound check git@github.com:$TRAVIS_REPO_SLUG.git; fi +script: + - yarn run travis:$JOB_PART +# after_success: +# - bash <(curl -s https://codecov.io/bash) diff --git a/package.json b/package.json index af93e15..0aef127 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "author": "Tobias Koppers @sokra", "description": "extracts inlined source map and offers it to webpack", "scripts": { - "test": "mocha -R spec" + "test": "mocha -R spec", + "travis:test": "mocha -R spec" }, "devDependencies": { "should": "^3.3.1", From 518d5bc506f5e50b794f3acd2ba9354ebf011cd8 Mon Sep 17 00:00:00 2001 From: Joshua Wiens Date: Sat, 25 Feb 2017 00:02:07 -0600 Subject: [PATCH 2/4] chore(pacakge): adds lock file as binary --- .gitattributes | 1 + yarn.lock | 141 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 .gitattributes create mode 100644 yarn.lock diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..bf1a0c8 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +yarn.lock -diff \ No newline at end of file diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..bf362f1 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,141 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +async@^0.9.0: + version "0.9.2" + resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" + +big.js@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" + +commander@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-0.6.1.tgz#fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06" + +commander@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.3.0.tgz#fd430e889832ec353b9acd1de217c11cb3eef873" + +debug@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.0.0.tgz#89bd9df6732b51256bc6705342bba02ed12131ef" + dependencies: + ms "0.6.2" + +diff@1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/diff/-/diff-1.0.8.tgz#343276308ec991b7bc82267ed55bc1411f971666" + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + +escape-string-regexp@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1" + +glob@3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.3.tgz#e313eeb249c7affaa5c475286b0e115b59839467" + dependencies: + graceful-fs "~2.0.0" + inherits "2" + minimatch "~0.2.11" + +graceful-fs@~2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-2.0.3.tgz#7cd2cdb228a4a3f36e95efa6cc142de7d1a136d0" + +growl@1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.8.1.tgz#4b2dec8d907e93db336624dcec0183502f8c9428" + +inherits@2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +jade@0.26.3: + version "0.26.3" + resolved "https://registry.yarnpkg.com/jade/-/jade-0.26.3.tgz#8f10d7977d8d79f2f6ff862a81b0513ccb25686c" + dependencies: + commander "0.6.1" + mkdirp "0.3.0" + +json5@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +loader-utils@~0.2.2: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +lru-cache@2: + version "2.7.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" + +minimatch@~0.2.11: + version "0.2.14" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a" + dependencies: + lru-cache "2" + sigmund "~1.0.0" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +mkdirp@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e" + +mkdirp@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12" + dependencies: + minimist "0.0.8" + +mocha@^1.18.2: + version "1.21.5" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-1.21.5.tgz#7c58b09174df976e434a23b1e8d639873fc529e9" + dependencies: + commander "2.3.0" + debug "2.0.0" + diff "1.0.8" + escape-string-regexp "1.0.2" + glob "3.2.3" + growl "1.8.1" + jade "0.26.3" + mkdirp "0.5.0" + +ms@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.6.2.tgz#d89c2124c6fdc1353d65a8b77bf1aac4b193708c" + +object-assign@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +should@^3.3.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/should/-/should-3.3.2.tgz#c883dd409b53bbdf1b55ec0d8fc3865f2b287e64" + +sigmund@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + +source-map@~0.1.33: + version "0.1.43" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" From 7747ad8d0bd21151b212df487875176472f91e89 Mon Sep 17 00:00:00 2001 From: Joshua Wiens Date: Mon, 6 Mar 2017 20:06:18 -0600 Subject: [PATCH 3/4] ci(Travis): remove webpack install --- .travis.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index e02c623..18234d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ -# Tasks are commented out purposfully. Will be uncommented for webpack-defaults application sudo: false language: node_js branches: @@ -9,26 +8,15 @@ matrix: include: - os: linux node_js: '6' - env: WEBPACK_VERSION="2.2.0" JOB_PART=test + env: JOB_PART=test - os: linux node_js: '4.3' - env: WEBPACK_VERSION="2.2.0" JOB_PART=test + env: JOB_PART=test - os: linux node_js: '7' - env: WEBPACK_VERSION="2.2.0" JOB_PART=test - # - os: linux - # node_js: '7' - # env: WEBPACK_VERSION="2.2.0" BITHOUND_CHECK=true JOB_PART=lint - # - os: linux - # node_js: '7' - # env: WEBPACK_VERSION="2.2.0" JOB_PART=coverage + env: JOB_PART=test before_install: - nvm --version - node --version -before_script: - - if [ "$WEBPACK_VERSION" ]; then yarn add webpack@^$WEBPACK_VERSION; fi - # - if [ "$BITHOUND_CHECK" ]; then npm install -g bithound; bithound check git@github.com:$TRAVIS_REPO_SLUG.git; fi script: - yarn run travis:$JOB_PART -# after_success: -# - bash <(curl -s https://codecov.io/bash) From 6d04a31181ea1ce3e0d820b981f93e4950db3110 Mon Sep 17 00:00:00 2001 From: Joshua Wiens Date: Mon, 6 Mar 2017 20:44:19 -0600 Subject: [PATCH 4/4] test: fix assertions failing after 8b9879e --- test/index.test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/index.test.js b/test/index.test.js index a40fb1d..3083bb6 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -52,7 +52,7 @@ describe("source-map-loader", function() { execLoader(path.join(__dirname, "fixtures", "inline-source-map.js"), function(err, res, map, deps, warns) { should.equal(err, null); warns.should.be.eql([]); - should.equal(res, "with SourceMap\n\n// comment"), + should.equal(res, "with SourceMap\n// comment"), map.should.be.eql({ "version":3, "file":"inline-source-map.js", @@ -70,7 +70,7 @@ describe("source-map-loader", function() { execLoader(path.join(__dirname, "fixtures", "external-source-map.js"), function(err, res, map, deps, warns) { should.equal(err, null); warns.should.be.eql([]); - should.equal(res, "with SourceMap\n\n// comment"), + should.equal(res, "with SourceMap\n// comment"), map.should.be.eql({ "version":3, "file":"external-source-map.js", @@ -90,7 +90,7 @@ describe("source-map-loader", function() { execLoader(path.join(__dirname, "fixtures", "external-source-map2.js"), function(err, res, map, deps, warns) { should.equal(err, null); warns.should.be.eql([]); - should.equal(res, "with SourceMap\n\n// comment"), + should.equal(res, "with SourceMap\n// comment"), map.should.be.eql({ "version":3, "file":"external-source-map2.js", @@ -125,7 +125,7 @@ describe("source-map-loader", function() { warns.should.be.eql([ "Cannot find source file 'missing-source-map2.txt': Error: File not found" ]); - should.equal(res, "with SourceMap\n\n// comment"), + should.equal(res, "with SourceMap\n// comment"), map.should.be.eql({ "version":3, "file":"missing-source-map2.js", @@ -146,7 +146,7 @@ describe("source-map-loader", function() { execLoader(path.join(__dirname, "fixtures", "charset-inline-source-map.js"), function(err, res, map, deps, warns) { should.equal(err, null); warns.should.be.eql([]); - should.equal(res, "with SourceMap\n\n// comment"), + should.equal(res, "with SourceMap\n// comment"), map.should.be.eql({ "version":3, "file":"charset-inline-source-map.js",