Meteor 1.3 *early beta* now available

Thanks @benjamn, but it still prompt the same error :frowning:

I donā€™t know much about Joi except that it is used in hapi.js. Are you using it to replace SimpleSchema or Collection2? If so, how are you doing it?

I couldnā€™t get Joi to work because of what I mentioned above. I had to use Yup instead which is a drop in replacement. It also integrates with the NPM form packages that I listed there too.

Yes I am using them to replace SS and C2.

1 Like

I just went from 1.3b4 to 1.3b6ā€¦ I had some code like this:

  export default {
    a: 1,
    b: 2
  }

I would import like this:

import {a, b} from './stuff.jsx';

Seems you canā€™t do this on beta 6 so I had to switch to something like this:

  export const a = 1;
  export const b = 2;

Then imported the same way. Is this intended?

@ciwolsey yes, see https://phabricator.babeljs.io/T2212

Everything is a named export now, even the default export, whose name is simply default. The value you export default is no longer assigned to module.exports; in fact, module.exports is never altered by the Babel 6 modules-to-CommonJS transform.

1 Like

Is there a new release? I noticed beta 7 is available, can we test it?

@lai Yep! I was just putting together an announcement post :wink:

New release!

To update to the latest beta release, run the following command in your meteor project:

meteor update --release 1.3-modules-beta.7

Changes: https://github.com/meteor/meteor/issues/5788#issuecomment-180405842

5 Likes

Thanks @benjamn I fixed the import meteor issue in 1.3beta7.May I ask about how can I import the account-base package, it seems like import {Accounts} from 'accounts-baseā€™ doesnā€™t work

@seanh same story: import {Accounts} from "meteor/accounts-base"

1 Like

Thanks @benjamn, it fixed all the import issue :slight_smile:

Iā€™m noticing an increase in performance with the rebuilds! This is a fairly new app and will have tons more added, weā€™ll see how rebuilds go.

2 Likes

Beta 7ā€™s working great for me. Rebuild and refresh of my little test app is taking about 5 seconds :slight_smile:

3 Likes

It seems, that cfs now broken with beta-7. I see this:

While computing assigned variables:
   /packages/cfs_power-queue/packages/cfs_power-queue.js: Deleting local
   variable in strict mode (541:4)
   
=> Your application has errors. Waiting for file change.

@sohaam That will be fixed in the next beta! https://github.com/meteor/meteor/issues/6166

2 Likes

I got an endless list of babel messages like these:

  babel program.body[9].expression.arguments[1].body.body[0].declarations[0].init.body.body[3].expression.callee MemberE
xpression: enter +1ms
  babel program.body[9].expression.arguments[1].body.body[0].declarations[0].init.body.body[3].expression.callee MemberE
xpression: Recursing into... +0ms
  babel program.body[9].expression.arguments[1].body.body[0].declarations[0].init.body.body[3].expression.callee.object
Identifier: enter +1ms
  babel program.body[9].expression.arguments[1].body.body[0].declarations[0].init.body.body[3].expression.callee.object
Identifier: Recursing into... +0ms

I canceld after 10 minutes.

@marc2 do you have a .babelrc file lying around somewhere, like maybe your home directory? That looks like debugging output that might somehow be accidentally turned onā€¦

@benjamn beta7 has been working great for me!

Any chance weā€™ll eventually get the equivalent of 'resoveRoot` in your packaging system? For example:

import 'lib/myModule'

// instead of

import '../../../../lib/myModule'

This seems to work great n SystemJS and Webpack. Itā€™s one of the things I miss most.

3 Likes

@SkinnyGeek1010 You should be able to

import '/lib/myModule' 

since beta-3 IIRC.

1 Like

@mquandalle Hmmm its not working for me. Also perhaps related but I also have to use the .js and .jsx file extensions. However, iā€™m not using the hackey imports/ folderā€¦ perhaps that changes things. Itā€™s just the same file layout as before but upgraded and some imported to fix race conditions.

edit, fixedā€¦ the folder really was just both/lib not lib/

For example:

// works
import authorizeForRole from '../../../lib/authorizeForRole.jsx';


// doesn't work
import authorizeForRole from '/lib/authorizeForRole.jsx';
// also not working (no ext)
import authorizeForRole from '../../../lib/authorizeForRole';

output

Error: Cannot find module '/lib/authorizeForRole.jsx'