mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
- Bump modules-runtime version
- Add changes to history.md
This commit is contained in:
@@ -77,6 +77,9 @@ Read our [Migration Guide](https://guide.meteor.com/2.7-migration.html) for this
|
||||
* `google-oauth@1.4.2`
|
||||
- Migrate from `http` to `fetch`
|
||||
|
||||
* `modules-runtime@0.13.0`
|
||||
- Fix some npm modules being imported as an empty object. [PR](https://github.com/meteor/meteor/pull/11954), [Issue 1](https://github.com/meteor/meteor/issues/11900), [Issue 2](https://github.com/meteor/meteor/issues/11853).
|
||||
|
||||
#### Independent Releases
|
||||
|
||||
## v2.6.1, 2022-02-18
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
name: "modules-runtime",
|
||||
version: "0.12.0",
|
||||
version: "0.13.0-rc270.0",
|
||||
summary: "CommonJS module system",
|
||||
git: "https://github.com/benjamn/install",
|
||||
documentation: "README.md"
|
||||
|
||||
@@ -51,6 +51,15 @@ Module.prototype.useNode = function () {
|
||||
throw new Error('npmRequire must be defined to use useNode');
|
||||
}
|
||||
|
||||
try {
|
||||
npmRequire.resolve(this.id);
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
`Cannot find module "${this.id}". ` +
|
||||
`Try installing the npm package or make sure it is not a devDependency.`
|
||||
);
|
||||
}
|
||||
|
||||
// See tools/static-assets/server/npm-require.js for the implementation
|
||||
// of npmRequire. Note that this strategy fails when importing ESM
|
||||
// modules (typically, a .js file in a package with "type": "module" in
|
||||
|
||||
Reference in New Issue
Block a user