@glimmer/babel-preset
Advanced tools
Comparing version 2.0.0-beta.15 to 2.0.0-beta.16
23
index.js
@@ -14,2 +14,9 @@ const generateVmPlugins = require('@glimmer/vm-babel-plugins'); | ||
const looseProps = | ||
typeof options.loose === 'object' && | ||
options.loose !== null && | ||
typeof options.loose.properties === 'boolean' | ||
? options.loose.properties | ||
: false; | ||
if (options.precompile) { | ||
@@ -79,7 +86,17 @@ precompile = options.precompile; | ||
__loadPlugins | ||
? require('@babel/plugin-proposal-class-properties') | ||
: require.resolve('@babel/plugin-proposal-class-properties'), | ||
[ | ||
__loadPlugins | ||
? require('@babel/plugin-proposal-class-properties') | ||
: require.resolve('@babel/plugin-proposal-class-properties'), | ||
{ loose: looseProps }, | ||
], | ||
[ | ||
__loadPlugins | ||
? require('@babel/plugin-proposal-private-methods') | ||
: require.resolve('@babel/plugin-proposal-private-methods'), | ||
{ loose: looseProps }, | ||
], | ||
], | ||
}; | ||
}; |
{ | ||
"name": "@glimmer/babel-preset", | ||
"version": "2.0.0-beta.15", | ||
"version": "2.0.0-beta.16", | ||
"description": "Glimmer.js Babel Preset", | ||
@@ -10,6 +10,7 @@ "repository": "https://github.com/glimmerjs/glimmer.js", | ||
"scripts": { | ||
"test": "mocha -r esm" | ||
"test": "mocha -r esm --timeout 10000" | ||
}, | ||
"dependencies": { | ||
"@babel/plugin-proposal-class-properties": "^7.8.3", | ||
"@babel/plugin-proposal-private-methods": "^7.13.0", | ||
"@babel/plugin-proposal-decorators": "^7.8.3", | ||
@@ -16,0 +17,0 @@ "@glimmer/compiler": "0.77.6", |
@@ -16,4 +16,8 @@ import { DEBUG } from '@glimmer/env'; | ||
@tracked bar = 123; | ||
#dog = "dog"; | ||
#cat() { return "cat" } | ||
} | ||
precompileTemplate('Hello, world!', { strictMode: true, scope: { Test } }); |
@@ -1,2 +0,2 @@ | ||
var _class, _descriptor, _temp; | ||
var _class, _descriptor, _dog, _cat; | ||
@@ -26,8 +26,15 @@ import { createTemplateFactory as _createTemplateFactory } from "@glimmer/core"; | ||
})); | ||
let Test = (_class = (_temp = class Test { | ||
let Test = (_class = (_dog = new WeakMap(), _cat = new WeakSet(), class Test { | ||
constructor() { | ||
_cat.add(this); | ||
_initializerDefineProperty(this, "bar", _descriptor, this); | ||
_dog.set(this, { | ||
writable: true, | ||
value: "dog" | ||
}); | ||
} | ||
}, _temp), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "bar", [tracked], { | ||
}), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "bar", [tracked], { | ||
configurable: true, | ||
@@ -41,2 +48,6 @@ enumerable: true, | ||
function _cat2() { | ||
return "cat"; | ||
} | ||
_createTemplateFactory( | ||
@@ -52,2 +63,2 @@ /* | ||
"isStrictMode": true | ||
}); | ||
}); |
@@ -16,4 +16,8 @@ import { DEBUG } from '@glimmer/env'; | ||
@tracked bar = 123; | ||
#dog = "dog"; | ||
#cat() { return "cat" } | ||
} | ||
precompileTemplate('Hello, world!', { strictMode: true, scope: { Test } }); |
@@ -1,2 +0,2 @@ | ||
var _class, _descriptor, _temp; | ||
var _class, _descriptor, _dog, _cat; | ||
@@ -26,8 +26,15 @@ import { createTemplateFactory as _createTemplateFactory } from "@glimmer/core"; | ||
})); | ||
let Test = (_class = (_temp = class Test { | ||
let Test = (_class = (_dog = new WeakMap(), _cat = new WeakSet(), class Test { | ||
constructor() { | ||
_cat.add(this); | ||
_initializerDefineProperty(this, "bar", _descriptor, this); | ||
_dog.set(this, { | ||
writable: true, | ||
value: "dog" | ||
}); | ||
} | ||
}, _temp), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "bar", [tracked], { | ||
}), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "bar", [tracked], { | ||
configurable: true, | ||
@@ -41,2 +48,6 @@ enumerable: true, | ||
function _cat2() { | ||
return "cat"; | ||
} | ||
_createTemplateFactory( | ||
@@ -52,2 +63,2 @@ /* | ||
"isStrictMode": true | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10721
237
7
1
+ Added@babel/plugin-proposal-private-methods@7.18.6(transitive)