mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix #10409 by ignoring self-referential browser aliases in package.json.
This commit is contained in:
@@ -1422,6 +1422,12 @@ export default class ImportScanner {
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore useless self-referential browser aliases, to fix
|
||||
// https://github.com/meteor/meteor/issues/10409.
|
||||
if (target.id === source.id) {
|
||||
return;
|
||||
}
|
||||
|
||||
Object.assign(alias, target);
|
||||
alias.absModuleId = this._getAbsModuleId(target.path);
|
||||
|
||||
|
||||
5
tools/tests/apps/modules/package-lock.json
generated
5
tools/tests/apps/modules/package-lock.json
generated
@@ -1210,6 +1210,11 @@
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
},
|
||||
"mobx": {
|
||||
"version": "5.8.0",
|
||||
"resolved": "https://registry.npmjs.org/mobx/-/mobx-5.8.0.tgz",
|
||||
"integrity": "sha512-NsZB+9bF5j+nv9Qwk6bNeE3np26a4TbTGkMpOLf6o1zXoM9BtHPQn/00px4uZ2AXJXtQML5P4MEWdMm6icMIfQ=="
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.22.2",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz",
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"jsx-import-test": "file:imports/links/jsx-import-test",
|
||||
"lodash-es": "^4.17.7",
|
||||
"meteor-node-stubs": "^0.4.1",
|
||||
"mobx": "5.8.0",
|
||||
"moment": "^2.22.2",
|
||||
"mssql": "^3.1.1",
|
||||
"mysql": "^2.15.0",
|
||||
|
||||
@@ -660,3 +660,11 @@ describe("imported *.tests.js modules", () => {
|
||||
assert.strictEqual(name, "imported.tests.js");
|
||||
});
|
||||
});
|
||||
|
||||
describe("issue #10409", () => {
|
||||
it("should be able to import mobx@5.8.0", () => {
|
||||
const { observable, action } = require("mobx");
|
||||
assert.strictEqual(typeof observable, "function");
|
||||
assert.strictEqual(typeof action, "function");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user