@makano/rew 1.2.76 → 1.2.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -97,6 +97,7 @@ module.exports.imp = function (runPath, context) {
97
97
  if (ispkg) {
98
98
  const pkg = getPackage(filename)(context, options);
99
99
  exports = pkg._onImport ? pkg._onImport() : pkg;
100
+ if(options.useDefaultForPackages) exports = { default: exports };
100
101
  } else if (foundCache) {
101
102
  } else if (type == REW_FILE_TYPE.TYPE || type == "coffee") {
102
103
  exports = exec({});
@@ -297,7 +297,18 @@ function compileRewStuff(content, options) {
297
297
 
298
298
  if (nextLastToken?.value == 'assert') {
299
299
  result += ', ';
300
+ const assertionToken = gnextToken(nextLastToken.ti, 2, tokens);
301
+ if(assertionToken.token.type == 'OTHER' && assertionToken.token.value == '{'){
302
+ hooks.push({
303
+ index: assertionToken.token.ti,
304
+ value: ' useDefaultForPackages: true, '
305
+ })
306
+ } else {
307
+ result += 'useDefaultForPackages: true, '
308
+ }
300
309
  i += 3;
310
+ } else {
311
+ result += ", { useDefaultForPackages: true }"
301
312
  }
302
313
 
303
314
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makano/rew",
3
- "version": "1.2.76",
3
+ "version": "1.2.77",
4
4
  "description": "A simple coffescript runtime and app manager",
5
5
  "main": "main.js",
6
6
  "directories": {