Commit Graph

334 Commits

Author SHA1 Message Date
denihs
c926ed5564 - update all shrinkwrap files from scratch
- map shrinkwrap before run npm install
2023-07-06 18:40:27 -04:00
denihs
1644c55360 - creating all shrinkwrap files from scratch
- using package name that comes from package.json (includes node_modules)
2023-07-06 17:22:25 -04:00
denihs
514478d1de - copy package.json to lib folder when generating a dev_bundle
- install all dependencies from scratch when we change lockfileVersion
2023-07-06 12:21:48 -04:00
denihs
c35916da31 generating .npm/ to all packages 2023-06-29 18:26:03 -04:00
denihs
725fe1f92c remove .npm from all packages to start fresh for node 18 2023-06-29 16:08:52 -04:00
Gabriel Grubba
8be2681c17 Meteor version to 3.0.0-alpha.10 ☄️ 2023-06-19 11:07:52 -03:00
Gabriel Grubba
6bc3d8f665 Meteor version to 3.0.0-alpha.9 ☄️ 2023-05-18 19:54:59 -03:00
Gabriel Grubba
92513e99ae Meteor version to 3.0.0-alpha.8 ☄️ 2023-05-18 19:04:55 -03:00
Gabriel Grubba
d113396ebb Meteor version to 3.0.0-alpha.7 ☄️ 2023-05-18 18:04:01 -03:00
Gabriel Grubba
8a49889478 Meteor version to 3.0.0-alpha.6 ☄️ 2023-05-11 12:14:20 -03:00
Gabriel Grubba
69d82c8e04 Meteor version to 3.0.0-alpha.5 ☄️ 2023-05-10 19:31:07 -03:00
Gabriel Grubba
cbb7eb41aa Meteor version to 3.0.0-alpha.4 ☄️ 2023-05-10 17:54:48 -03:00
Gabriel Grubba
4af058b6a5 Meteor version to 3.0.0-alpha.3 ☄️ 2023-05-10 14:56:47 -03:00
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