Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Reports initial deprecations as deprecations may have happened before metrics activation.
setImmediate(() => {
for (let deprecation of grim.getDeprecations()) {
this.reportDeprecation(deprecation)
}
})
})
atom.packages.onDidLoadPackage(pack => {
if (!this.packageVersionCache[pack.name]) {
this.packageVersionCache[pack.name] = getPackageVersion(pack)
}
})
grim.on('updated', deprecation => {
setImmediate(() => this.reportDeprecation(deprecation))
})
},
constructor({ uri }) {
this.uri = uri;
this.subscriptions = new CompositeDisposable();
this.subscriptions.add(
Grim.on('updated', () => {
etch.update(this);
})
);
// TODO: Remove conditional when the new StyleManager deprecation APIs reach stable.
if (atom.styles.onDidUpdateDeprecations) {
this.subscriptions.add(
atom.styles.onDidUpdateDeprecations(() => {
etch.update(this);
})
);
}
etch.initialize(this);
this.subscriptions.add(
atom.commands.add(this.element, {
'core:move-up': () => {
this.scrollUp();
const setupDeprecations = function() {
const Grim = require('grim');
return Grim.on('updated', function() {
const deprecations = Grim.getDeprecations().map(deprecation =>
deprecation.serialize()
);
Grim.clearDeprecations();
return global.emit('task:deprecations', deprecations);
});
};