Commit Graph

6208 Commits

Author SHA1 Message Date
Ben Newman
696b8d4b3c Fix Buffer conversion logic in writeFile. 2017-02-09 10:21:21 -05:00
Ben Newman
f5ae115c10 Don't forget to write dynamic files without source maps. 2017-02-09 10:19:49 -05:00
Ben Newman
e469eeec05 Fix tests by adding //# sourceMappingURL= only to dynamic files.
Also, the regular expression for removing existing source map comments now
matches only if the comment starts at the beginning of a line, following
previous behavior more closely.

To get this exactly right, we would need to tokenize the source to avoid
matching comments in string literals, for example, but that's hard because
this logic needs to work for multiple file types, not just JavaScript.
2017-02-08 19:40:38 -05:00
Ben Newman
fa23107642 Merge branch 'release-1.4.3' into release-1.5 2017-02-08 16:10:52 -05:00
Ben Newman
2010e9d11a Merge branch 'devel' into release-1.4.3 2017-02-08 14:47:03 -05:00
Ben Newman
858dc64db4 Merge branch 'master' into devel 2017-02-08 14:43:26 -05:00
Ben Newman
cafe4cc084 Fix bad npm package stripping logic introduced to fix #8136.
When `start + maxPartCount > parts.length`, this code was comparing
array holes to strings, leading to unpredictable results.

Blame: 2613582311
2017-02-08 11:04:20 -05:00
Ben Newman
4baa5a44dc Allow file.data to be a Buffer in Target#minifyJs. 2017-02-07 20:06:10 -05:00
Ben Newman
5ff0f4f987 Fix test failures by re-anonymizing module wrapper functions. 2017-02-07 19:22:47 -05:00
Ben Newman
8e344a324a Bump LINKER_CACHE_SALT and compiler.BUILT_BY for good measure. 2017-02-07 16:18:40 -05:00
Ben Newman
158adc48e8 Expose manifest of dynamic modules to the dynamic-import package. 2017-02-07 16:17:44 -05:00
Ben Newman
22d1b3ddfe Make special arguments in boot.js more configurable.
Currently this functionality is only used for exposing npmRequire and
Profile to the packages/modules-runtime.js bundle, but I'm planning to use
it for packages/dynamic-import.js soon.
2017-02-07 16:17:43 -05:00
Ben Newman
9845c2f484 Unify sourceMappingURL logic in tools/isobuild/bundler.js. 2017-02-07 16:17:43 -05:00
Ben Newman
ebff32f626 Write dynamic files separately in builder output directories. 2017-02-07 16:17:42 -05:00
Ben Newman
a2e950dfd3 Include dynamic stubs in linked meteorInstall bundles. 2017-02-07 16:17:42 -05:00
Ben Newman
4bff3220e8 Include .jsonData on files returned by ImportScanner#getOutputFiles. 2017-02-07 16:17:41 -05:00
Ben Newman
0e210ef53c Allow ImportScanner#getOutputFiles to return dynamic files. 2017-02-07 16:17:41 -05:00
Ben Newman
38c1e5b88a Teach findImportedModuleIdentifiers to find dynamic imports. 2017-02-07 16:17:41 -05:00
Ben Newman
868a52829f Register package@version constraints for current release.
Package version unpinning (#7084) removed all exact package@=version
constraints derived from the current release.

As we discovered with Meteor 1.4.2.4 (#8306), this meant releases no
longer had any power to enforce package upgrades, which is why the
follow-up Meteor 1.4.2.5 release (#8311) was necessary.

This commit has the same effect as putting package@version in your
.meteor/packages file for every local/core package that your app uses.
2017-02-07 14:52:49 -05:00
Ben Newman
59124681bc Preserve true "main" and "browser" fields of package.json modules.
This reverts commit 32140c8707, restoring
commit 6c643a4763.
2017-02-07 10:43:20 -05:00
Ben Newman
29b88d29d4 Merge branch 'devel' into release-1.4.3 2017-02-07 10:37:54 -05:00
Ben Newman
3801349437 Merge branch 'master' into devel 2017-02-07 10:36:49 -05:00
Jesse Rosenberger
32140c8707 Revert "Preserve true "main" and "browser" fields of package.json modules."
This reverts commit 6c643a4763.
2017-02-02 20:26:54 -08:00
Ben Newman
a00b19d1fb Merge branch 'devel' into release-1.4.3 2017-02-02 16:07:50 -05:00
Hugh Willson
f57d4d157d Added extra colon-converter calls to the bundler and linker. (#8293)
* Added extra colon-converter calls to the bundler and linker.
* Rewording of convert to convertColons for clarity.
2017-02-02 15:54:59 -05:00
Ben Newman
a3e8cf6763 Update modules test app to Meteor 1.4.2.4. 2017-02-02 15:46:59 -05:00
Ben Newman
cc8734ddca Merge branch 'master' into devel 2017-02-02 15:18:48 -05:00
Ben Newman
1f60258821 Merge pull request #8142 from abernix/feature/fix-7849-stale-cordova-build
Cordova project preparation must occur before copying to the build
2017-02-01 12:40:06 -05:00
Ben Newman
bf9338b367 Support ./meteor publish-release --skip-tree-hashing ... flag. 2017-02-01 12:24:06 -05:00
Ben Newman
c683a79595 Unify file.emptyStub and file.imported === "implicit" as file.implicit.
Note that there was a typo in ResourceSlot#addStylesheet, so
file.emptyStub was never === true before.
2017-02-01 10:35:31 -05:00
Ben Newman
6c643a4763 Preserve true "main" and "browser" fields of package.json modules.
Previously, when building a JavaScript bundle for the client, if a
package.json file had a string-valued "browser" field, we would replace
the value of the "main" field of the bundled package.json module with the
value of the "browser" field. This trick was important because it allowed
an npm package to have a different entry point on the client than it had
on the server.

However, that approach became inconsistent if the package.json file was
also explicitly imported as a module, because the package.json stub used
for module resolution prevented the real contents of package.json from
getting bundled, and disagreed with the original package.json module about
the value of the "main" field.

To resolve that inconsistency, it seems better to avoid modifying the
"main" field of package.json modules, and instead rely on the runtime
module system to make sense of the "browser" field, regardless of whether
the package.json module is a stub used only for module resolution or
contains the full contents of the original package.json file.

The ability to understand "browser" fields of package.json modules was
introduced in install@0.8.3:
377d1a3b51

This is potentially a backwards-incompatible change for developers using
this version of `ImportScanner` and `Resolver` who have not yet upgraded
their `modules-runtime` package to at least version 0.7.8. The solution is
to upgrade `modules-runtime`, though it would be nice to enforce that
better somehow.
2017-02-01 10:34:52 -05:00
Ben Newman
2613582311 Always copy node_modules/.bin into bundle/programs/server/npm.
Fixes #8136.
2017-02-01 09:58:10 -05:00
Jesse Rosenberger
3b8c886f6f Merge branch 'devel' into release-1.4.3 2017-01-26 15:39:21 -08:00
Ben Newman
355cde306a Merge pull request #8239 from wojtkowiak/cordova-6.4.0
Update to Cordova 6.4.0
2017-01-25 16:39:13 -05:00
Ben Newman
0734a70299 Merge branch 'devel' into release-1.4.3 2017-01-19 11:55:29 -05:00
Hugh Willson
524e34bce2 Slight wording changes. 2017-01-15 10:37:52 -05:00
Hugh Willson
7064a029ef Updated to include note about matching architecture versions for packages. 2017-01-13 10:48:04 -05:00
Hugh Willson
24e64f483e Updated meteor build CLI help to include os.windows.x86_32 --architecture option. 2017-01-12 11:05:22 -05:00
Bartosz Wojtkowiak
9347cdff3d Update Cordova pinned plugin versions and dependencies to latest verions 2017-01-11 22:13:29 +01:00
Bartosz Wojtkowiak
503c0472d4 Update cordova-ios and cordova-android to latest versions 2017-01-11 21:55:07 +01:00
Ben Newman
fd9bda20df Merge pull request #8170 from abernix/feature/fix-7859-messaging
Improve helpfulness of error message when combining different files.
2017-01-10 18:48:01 -05:00
Ben Newman
d3bed96215 Merge branch 'devel' into release-1.4.3 2017-01-10 12:55:23 -05:00
David Glasser
b7286fc90d Make deploy errors easier to identify 2017-01-05 13:11:01 -08:00
Ben Newman
13eee64d95 Style tweak to reduce indentation in ImportScanner#_addPkgJsonToOutput. 2017-01-04 13:13:45 -05:00
Ben Newman
4fb26259b8 Unify file.emptyStub and file.imported === "implicit" as file.implicit.
Note that there was a typo in ResourceSlot#addStylesheet, so
file.emptyStub was never === true before.
2017-01-04 13:00:24 -05:00
Ben Newman
2eab0b2bf4 Preserve true "main" and "browser" fields of package.json modules.
Previously, when building a JavaScript bundle for the client, if a
package.json file had a string-valued "browser" field, we would replace
the value of the "main" field of the bundled package.json module with the
value of the "browser" field. This trick was important because it allowed
an npm package to have a different entry point on the client than it had
on the server.

However, that approach became inconsistent if the package.json file was
also explicitly imported as a module, because the package.json stub used
for module resolution prevented the real contents of package.json from
getting bundled, and disagreed with the original package.json module about
the value of the "main" field.

To resolve that inconsistency, it seems better to avoid modifying the
"main" field of package.json modules, and instead rely on the runtime
module system to make sense of the "browser" field, regardless of whether
the package.json module is a stub used only for module resolution or
contains the full contents of the original package.json file.

The ability to understand "browser" fields of package.json modules was
introduced in install@0.8.3:
377d1a3b51

This is potentially a backwards-incompatible change for developers using
this version of `ImportScanner` and `Resolver` who have not yet upgraded
their `modules-runtime` package to at least version 0.7.8. The solution is
to upgrade `modules-runtime`, though it would be nice to enforce that
better somehow.
2017-01-04 11:54:17 -05:00
Jesse Rosenberger
d15e1f9172 Ensure babel-runtime is included in skelton variations & bump versions
Also updated the `meteor-node-stubs` to the latest published release.

Closes meteor/meteor#8202
2017-01-04 01:44:05 +02:00
Ben Newman
1ee3774bdb Merge pull request #8183 from cwohlman/remove-insecure-packages-from-bare-skeleton
Remove autopublish and insecure from the bare skeleton app
2017-01-03 18:43:36 -05:00
Oleksandr Chekhovskyi
3d3c81830a Update node-mongodb driver to 2.2.16
This fixes an issue where the driver fails to recover from unresponsive
primary in a replica set.
2016-12-29 20:06:56 +01:00
Joshua Ohlman
0a87fa5df6 Remove autopublish and insecure from the bare skeleton app
Fixes #8145
2016-12-22 07:54:21 -06:00