Commit Graph

321 Commits

Author SHA1 Message Date
Gabriel Grubba
36d64af64d Meteor version to 2.8.1 ☄️ 2022-11-14 08:20:31 -03:00
Gabriel Grubba
9ddb1eb06a Meteor version to 2.8.1-rc.0 ☄️ 2022-11-10 10:18:33 -03:00
Gabriel Grubba
9afbdc7e75 Meteor version to 2.8.1-beta.2 ☄️ 2022-11-07 17:05:39 -03:00
Gabriel Grubba
ab4350e3a6 Meteor version to 2.8.1-beta.1 ☄️ 2022-11-04 10:41:32 -03:00
Gabriel Grubba
971f85e8a6 Meteor version to 2.8.1-beta.0 ☄️ 2022-10-27 10:59:57 -03:00
Gabriel Grubba
71927cd140 fix(errors): moved logic to function imports 2022-09-02 12:37:37 -03:00
Gabriel Grubba
c73fea7ec4 tests(errors): added case when there is client & server 2022-09-02 12:37:15 -03:00
Gabriel Grubba
2fcd55827d fix(errors): adjusted how it handles paths 2022-09-02 12:36:51 -03:00
Gabriel Grubba
4317e423f1 tests(module-runtime): added node_module error validation 2022-08-30 16:18:15 -03:00
Gabriel Grubba
0255d06728 tests(module-runtime): adjusted test organization 2022-08-30 16:17:40 -03:00
Gabriel Grubba
a385903a9f chore: added extra validations 2022-08-30 16:17:01 -03:00
Gabriel Grubba
8bfe20990b feat(module-runtime): added error validation to server.js 2022-08-30 16:11:11 -03:00
Gabriel Grubba
7a73da98c8 fix(module-runtime): adjusted file declaration 2022-08-30 16:10:05 -03:00
Gabriel Grubba
ebff7901e0 feat(importErrors): adjusted file name 2022-08-30 16:09:35 -03:00
Gabriel Grubba
21e2667831 tests(errors): created tests for client and server 2022-08-27 14:53:08 -03:00
Gabriel Grubba
1712c4c5ae fix(errors): cross-boud. message 2022-08-27 14:52:35 -03:00
Gabriel Grubba
51d4d3dbc1 chore(runtime-errors): adjusted error text 2022-08-25 15:38:35 -03:00
Gabriel Grubba
550e752cb3 tests(runtime-errors): adjusted the ci 2022-08-25 15:37:42 -03:00
Gabriel Grubba
b55ccd7cb9 test(adjusted test naming) 2022-08-25 13:48:27 -03:00
Gabriel Grubba
d4e9f85ee7 tests(module-runtime): added verifyErrors tests 2022-08-18 22:14:18 -03:00
Gabriel Grubba
ce179fa55c chore(modules.fallback): all goes to varifyErrors 2022-08-18 22:13:55 -03:00
Gabriel Grubba
156e86815c chore(verifyErrors): esnext -> es5 2022-08-18 22:12:07 -03:00
Gabriel Grubba
4888a5dbb3 chore(modules-runtime): added files in package.js 2022-08-18 22:10:40 -03:00
Gabriel Grubba
bfd81cc616 chore: removed index.js from module-runtime 2022-08-18 22:09:45 -03:00
Gabriel Grubba
968eb71800 tests(module-erros): added tests 2022-08-18 15:37:54 -03:00
Gabriel Grubba
2c2038978d feat(module-errors): created custom errors for modules 2022-08-18 15:37:37 -03:00
Gabriel Grubba
995ef9677e wip(tests): started adding tests 2022-08-15 09:22:51 -03:00
Frederico Maia Arantes
dee85e3486 Bump packages for release 2022-03-24 18:23:53 -03:00
Frederico Maia Arantes
560707824a Bump packages for release 2022-03-17 18:52:26 -03:00
Frederico Maia Arantes
7fc0c0055b Bump packages for release 2022-03-14 12:12:19 -03:00
zodern
28c22fafb3 - Bump modules-runtime version
- Add changes to history.md
2022-03-01 14:35:34 -04:00
zodern
648b08d5ea Remove duplicate check from useNode
The import scanner already checks the path before creating the call to module.useNode.
2022-02-28 14:55:36 -06:00
zodern
09b7dbb792 Throw errors instead of returning false in useNode 2022-02-28 14:48:57 -06:00
zodern
67bc26be5d Allow useNode to throw if module not found 2022-02-28 14:33:44 -06:00
Ben Newman
924c748ecc Avoid bailing out with module.useNode() for ESM modules.
On the server, Meteor attempts to avoid bundling node_modules code by
replacing entry point modules with a stub that calls module.useNode() (see
packages/modules-runtime/server.js). This trick allows evaluating server
node_modules natively in Node.js, faithfully preserving all Node-specific
behaviors, such as module.id being an absolute file system path, the
__dirname and __filename variables, the ability to import binary .node
modules, and so on.

However, starting in Node.js 12.16.0 (Meteor 1.9.1+), modules evaluated
natively by Node are considered ECMAScript modules (ESM) if the closest
package.json file has "type": "module" (or has an .mjs file extension).
This poses a problem for the module.useNode() trick, because ESM modules
cannot be imported synchronously using require (which is currently how
module.useNode() works).

To work around this new error, this commit checks package.json for "type":
"module" in ImportScanner#shouldUseNode to determine whether it's safe to
use the module.useNode() trick.

The good news is that ESM modules don't have access to nearly as many
Node.js-specific quirks: no module, require, or exports variables; no
__dirname, no __filename; no ability to import JSON or other non-ESM file
types (at least right now). So it seems somewhat less important for ESM
code (compared to CommonJS code) to bail out into native Node.js execution
using module.useNode(). In other words, bundling server code should not
affect its execution in nearly as many cases, if that code is ESM rather
than legacy CommonJS.

If this good news turns out to be overly optimistic, we can consider using
a different kind of bailout stub that's capable of importing ESM using
dynamic import(). For now, making sure we avoid bailing out for ESM code
like @babel/runtime/helpers/esm/* is the priority.
2020-02-19 15:24:42 -04:00
filipenevola
39cc07472f Bump package versions for the official 1.9 release. 🎉 2020-01-08 18:18:03 -05:00
Ben Newman
80b4e4d1c2 Bump package versions for 1.9-rc.3 release. 2020-01-07 21:06:10 -05:00
Ben Newman
4ce94e8b1f Bump package versions for 1.9-rc.2 release. 2020-01-02 11:01:25 -05:00
Ben Newman
ed214002e0 Bump package versions for 1.9-rc.1 release.
This release contains a potential mitigation for the excessive garbage
collection discussed here: https://github.com/meteor/meteor/pull/10527#issuecomment-567982128
2019-12-30 12:11:46 -05:00
Ben Newman
e48dbc6d1c Bump package versions for 1.9-rc.0 release. 🎉
With Node.js 8.x nearing end-of-life status at the end of this year, and
Node.js 12 now in LTS, we think it makes sense to finalize Meteor 1.9
sooner rather than later, and continue working to take advantage of all
the great features of Node 12 in future 1.9.x releases.

As usual, the meaning of "release candidate" is that we can still fix bugs
before the final release, but there will be no new features added.
2019-12-19 09:11:29 -05:00
Ben Newman
c9e6225085 Bump package versions for 1.9-beta.4 release. 2019-11-26 17:52:03 -05:00
Ben Newman
d5a45c1f90 Bump package versions for 1.9-beta.3 release. 2019-11-14 16:43:57 -05:00
Ben Newman
0e1b0cb250 Bump package versions for 1.9-beta.2 release. 2019-11-10 00:50:56 -05:00
Ben Newman
f8de4127da Merge branch 'release-1.8.2' into release-1.9 2019-11-08 20:07:59 -05:00
Ben Newman
aec3bc76e3 Bump package versions for 1.8.2-rc.7 release. 2019-11-08 16:33:29 -05:00
Ben Newman
bd9043db20 Prefer "main" field of package.json over "module" in legacy bundle.
https://github.com/meteor/meteor/issues/10658#issuecomment-550456095
https://github.com/meteor/meteor/issues/10658#issuecomment-551870115

As usual, changes to module resolution logic need to happen in parallel in
tools/isobuild/resolver.ts and in packages/modules-runtime. However,
thanks to the modern/legacy system, it's easy to make the modules-runtime
package behave exactly the way(s) we want in the server, modern client,
and legacy client bundles.
2019-11-08 11:15:23 -05:00
Ben Newman
00564ac2ad Bump package versions for 1.8.2-rc.6 release.
I made a small mistake publishing rc.5 (forgot to bump
meteor-release-experimental.json), so it seemed simpler to skip straight
to rc.6.
2019-11-05 17:27:36 -05:00
Ben Newman
19f00eef81 Bump package versions for 1.8.2-rc.4 release. 2019-10-24 19:36:39 -04:00
Ben Newman
8dd87a6636 Bump package versions for 1.8.2-rc.3 release. 2019-09-23 12:26:57 -04:00
Ben Newman
62faa518a0 Bump package versions for 1.8.2-rc.2 release. 2019-09-23 10:06:43 -04:00