Skip to content

Commit

Permalink
Merge pull request #10330 from meteor/fix-findImportedModuleIdentifie…
Browse files Browse the repository at this point in the history
…rs-hash-collision

Ensure file.hash is always computed from sha1(file.data).
  • Loading branch information
benjamn committed Nov 13, 2018
2 parents 152879c + 253213c commit f7bd8e9
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 72 deletions.
10 changes: 10 additions & 0 deletions History.md
@@ -1,5 +1,15 @@
## v.NEXT

### Breaking changes
N/A

### Migration steps
N/A

### Changes

* The `meteor-babel` npm package has been updated to version 7.1.5.

## v1.8, 2018-10-08

### Breaking changes
Expand Down
100 changes: 50 additions & 50 deletions packages/babel-compiler/.npm/package/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/babel-compiler/babel-compiler.js
Expand Up @@ -30,7 +30,6 @@ BCp.processFilesForTarget = function (inputFiles) {
if (inputFile.supportsLazyCompilation) {
inputFile.addJavaScript({
path: inputFile.getPathInPackage(),
hash: inputFile.getSourceHash(),
bare: !! inputFile.getFileOptions().bare
}, function () {
return compiler.processOneFileForTarget(inputFile);
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-compiler/package.js
Expand Up @@ -6,11 +6,11 @@ Package.describe({
// isn't possible because you can't publish a non-recommended
// release with package versions that don't have a pre-release
// identifier at the end (eg, -dev)
version: '7.2.1'
version: '7.2.2'
});

Npm.depends({
'meteor-babel': '7.1.3',
'meteor-babel': '7.1.5',
'json5': '2.1.0'
});

Expand Down
2 changes: 1 addition & 1 deletion packages/ecmascript/package.js
@@ -1,6 +1,6 @@
Package.describe({
name: 'ecmascript',
version: '0.12.1',
version: '0.12.2',
summary: 'Compiler plugin that supports ES2015+ in all .js files',
documentation: 'README.md'
});
Expand Down
4 changes: 2 additions & 2 deletions scripts/dev-bundle-tool-package.js
Expand Up @@ -14,13 +14,13 @@ var packageJson = {
pacote: "https://github.com/meteor/pacote/tarball/a3285854a68e4969d6c8abaa74407f7d113b178f",
"node-gyp": "3.7.0",
"node-pre-gyp": "0.10.3",
"meteor-babel": "7.1.3",
"meteor-babel": "7.1.5",
"meteor-promise": "0.8.6",
promise: "8.0.1",
reify: "0.17.3",
fibers: "2.0.0",
// So that Babel can emit require("@babel/runtime/helpers/...") calls.
"@babel/runtime": "7.1.2",
"@babel/runtime": "7.1.5",
// For backwards compatibility with isopackets that still depend on
// babel-runtime rather than @babel/runtime.
"babel-runtime": "7.0.0-beta.3",
Expand Down
16 changes: 5 additions & 11 deletions tools/isobuild/compiler-plugin.js
Expand Up @@ -578,7 +578,6 @@ class ResourceSlot {
// files.convertToStandardLineEndings only works on strings for now
data: self.inputResource.data.toString('utf8'),
path: self.inputResource.path,
hash: self.inputResource.hash,
bare: self.inputResource.fileOptions &&
(self.inputResource.fileOptions.bare ||
// XXX eventually get rid of backward-compatibility "raw" name
Expand All @@ -594,14 +593,10 @@ class ResourceSlot {
// Any resource that isn't handled by compiler plugins just gets passed
// through.
if (self.inputResource.type === "js") {
let resource = self.inputResource;
if (! _.isString(resource.sourcePath)) {
resource.sourcePath = self.inputResource.path;
}
if (! _.isString(resource.targetPath)) {
resource.targetPath = resource.sourcePath;
}
self.jsOutputResources.push(resource);
self.jsOutputResources.push(new JsOutputResource({
resourceSlot: self,
options: self.inputResource,
}));
} else {
self.outputResources.push(self.inputResource);
}
Expand Down Expand Up @@ -964,8 +959,7 @@ class OutputResource {
return this._set("data", data);

case "hash":
const { hash } = this._initialOptions;
return this._set("hash", hash || sha1(this._get("data")));
return this._set("hash", sha1(this._get("data")));

case "sourceMap":
let { sourceMap } = this._initialOptions;
Expand Down
2 changes: 1 addition & 1 deletion tools/static-assets/skel-bare/package.json
Expand Up @@ -5,7 +5,7 @@
"start": "meteor run"
},
"dependencies": {
"@babel/runtime": "^7.0.0",
"@babel/runtime": "^7.1.5",
"meteor-node-stubs": "^0.4.1"
}
}
2 changes: 1 addition & 1 deletion tools/static-assets/skel-full/package.json
Expand Up @@ -6,7 +6,7 @@
"test": "meteor test --once --driver-package meteortesting:mocha"
},
"dependencies": {
"@babel/runtime": "^7.0.0",
"@babel/runtime": "^7.1.5",
"meteor-node-stubs": "^0.4.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion tools/static-assets/skel-minimal/package.json
Expand Up @@ -8,7 +8,7 @@
"visualize": "meteor --production --extra-packages bundle-visualizer"
},
"dependencies": {
"@babel/runtime": "^7.0.0",
"@babel/runtime": "^7.1.5",
"meteor-node-stubs": "^0.4.1"
},
"meteor": {
Expand Down
2 changes: 1 addition & 1 deletion tools/static-assets/skel-react/package.json
Expand Up @@ -8,7 +8,7 @@
"visualize": "meteor --production --extra-packages bundle-visualizer"
},
"dependencies": {
"@babel/runtime": "^7.0.0",
"@babel/runtime": "^7.1.5",
"meteor-node-stubs": "^0.4.1",
"react": "^16.5.0",
"react-dom": "^16.5.0"
Expand Down
2 changes: 1 addition & 1 deletion tools/static-assets/skel/package.json
Expand Up @@ -8,7 +8,7 @@
"visualize": "meteor --production --extra-packages bundle-visualizer"
},
"dependencies": {
"@babel/runtime": "^7.0.0",
"@babel/runtime": "^7.1.5",
"meteor-node-stubs": "^0.4.1"
},
"meteor": {
Expand Down

0 comments on commit f7bd8e9

Please sign in to comment.