Skip to content
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.

Update webpack #2186

Merged
merged 1 commit into from Jan 12, 2017
Merged

Update webpack #2186

merged 1 commit into from Jan 12, 2017

Conversation

gemfarmer
Copy link
Contributor

@gemfarmer gemfarmer commented Jan 10, 2017

Fixes issue(s) build issues on #2185

CircleCI

馃槑 PREVIEW

Changes proposed in this pull request:

  • creates npm script to update all webpack-generated files and output new sourcemaps. This should address the dependency issue we were seeing in Dev --> staging聽#2185, where all node packages had been updated, but new source maps hadn't been created to reference those updates.
  • updated the circle.yml config to run dependencies and build processes in the proper order
  • updated the circle.yml config to run the new update-webpack command.

/cc @meiqimichelle @shawnbot

}
mapping.originalLine = original.line;
mapping.originalColumn = original.column;
if (original.name != null) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use '!==' to compare with 'null'.
Too many errors. (10% scanned).

if (aSourceMapPath != null) {
mapping.source = util.join(aSourceMapPath, mapping.source)
}
if (sourceRoot != null) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use '!==' to compare with 'null'.

// Copy mapping
mapping.source = original.source;
if (aSourceMapPath != null) {
mapping.source = util.join(aSourceMapPath, mapping.source)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

if (original.source != null) {
// Copy mapping
mapping.source = original.source;
if (aSourceMapPath != null) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use '!==' to compare with 'null'.

line: mapping.originalLine,
column: mapping.originalColumn
});
if (original.source != null) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use '!==' to compare with 'null'.

// Find mappings for the "sourceFile"
this._mappings.unsortedForEach(function (mapping) {
if (mapping.source === sourceFile && mapping.originalLine != null) {
// Check if it can be mapped by the source map, then update the mapping.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.


// Find mappings for the "sourceFile"
this._mappings.unsortedForEach(function (mapping) {
if (mapping.source === sourceFile && mapping.originalLine != null) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use '!==' to compare with 'null'.

if (sourceRoot != null) {
sourceFile = util.relative(sourceRoot, sourceFile);
}
// Applying the SourceMap can add and remove items from the sources and

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

}
var sourceRoot = this._sourceRoot;
// Make "sourceFile" relative if an absolute Url is passed.
if (sourceRoot != null) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use '!==' to compare with 'null'.

if (aSourceMapConsumer.file == null) {
throw new Error(
'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
'or the source map\'s "file" property. Both were omitted.'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed double and single quotes.

if (aSourceFile == null) {
if (aSourceMapConsumer.file == null) {
throw new Error(
'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.
Mixed double and single quotes.

var sourceFile = aSourceFile;
// If aSourceFile is omitted, we will use the file property of the SourceMap
if (aSourceFile == null) {
if (aSourceMapConsumer.file == null) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use '===' to compare with 'null'.

function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
var sourceFile = aSourceFile;
// If aSourceFile is omitted, we will use the file property of the SourceMap
if (aSourceFile == null) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use '===' to compare with 'null'.

SourceMapGenerator.prototype.applySourceMap =
function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
var sourceFile = aSourceFile;
// If aSourceFile is omitted, we will use the file property of the SourceMap

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

* relative to the SourceMapGenerator.
*/
SourceMapGenerator.prototype.applySourceMap =
function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

* @param aSourceMapPath Optional. The dirname of the path to the source map
* to be applied. If relative, it is relative to the SourceMapConsumer.
* This parameter is needed when the two source maps aren't in the same
* directory, and the source map to be applied contains relative source

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

@gemfarmer
Copy link
Contributor Author

gemfarmer commented Jan 10, 2017

@meiqimichelle all these hound errors are auto-generated by webpack, so it is a bit out of our control.

Scratch that. I was just being lazy. I ignored the autofiles from being linted with e465ba5.

@gemfarmer
Copy link
Contributor Author

@meiqimichelle so this is still failing, but in a different way. The site runs fine locally and forums suggest that the build error we are getting now on Circle will be intermittent. I'm going to put this on hold and try to rebuild it later.

@gemfarmer
Copy link
Contributor Author

@meiqimichelle I reviewed this again, and it has my stamp of approval to merge. @shawnbot, what do you think?

Copy link
Contributor

@shawnbot shawnbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃憤 LGTM!

@gemfarmer gemfarmer merged commit f7b3d10 into dev Jan 12, 2017
@gemfarmer
Copy link
Contributor Author

Cool!

@gemfarmer gemfarmer deleted the node-dependencies branch January 12, 2017 18:30
This was referenced Feb 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants