diff --git a/lib/compat-shim.ts b/lib/compat-shim.ts new file mode 100644 index 00000000..131c98e3 --- /dev/null +++ b/lib/compat-shim.ts @@ -0,0 +1,31 @@ +import type * as Tslint from "tslint"; + +/** + * Shim for TSLint v3 interoperability + * @param {Function} Linter TSLint v3 linter + * @return {Function} TSLint v4-compatible linter + */ +export function shim(Linter: Function): typeof Tslint.Linter { + function LinterShim(options) { + this.options = options; + this.results = {}; + } + + // Assign class properties + Object.assign(LinterShim, Linter); + + // Assign instance methods + LinterShim.prototype = { + ...Linter.prototype, + lint(filePath, text, configuration) { + const options = { ...this.options, configuration }; + const linter = new Linter(filePath, text, options); + this.results = linter.lint(); + }, + getResult() { + return this.results; + }, + }; + + return LinterShim; +} diff --git a/lib/config.ts b/lib/config.ts index 782a635c..3c3050c3 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -57,7 +57,7 @@ export interface ConfigSchema { globalNodePath: string | null, } -export const defaultConfig = { +export const defaultConfig = Object.freeze({ enableSemanticRules: false, rulesDirectory: "", fixOnSave: false, @@ -65,4 +65,4 @@ export const defaultConfig = { useLocalTslint: true, useGlobalTslint: false, globalNodePath: "", -} +} as const) diff --git a/lib/main.ts b/lib/main.ts index c6fcfba2..a04fb051 100644 --- a/lib/main.ts +++ b/lib/main.ts @@ -3,13 +3,12 @@ import path from 'path'; import { promises } from 'fs'; const { stat } = promises; import { WorkerHelper } from './workerHelper'; -export { config } from './config'; -import { defaultConfig } from "./config" +import { defaultConfig, ConfigSchema } from "./config" const grammarScopes = ['source.ts', 'source.tsx']; const editorClass = 'linter-tslint-compatible-editor'; const idleCallbacks = new Set(); -const config = defaultConfig; +const config: ConfigSchema = { ...defaultConfig } // copy of default config // Worker still hasn't initialized, since the queued idle callbacks are // done in order, waiting on a newly queued idle callback will ensure that @@ -24,141 +23,141 @@ function waitOnIdle() { }); }; -const TsLintPackage = { - activate() { - const depsCallbackID = window.requestIdleCallback(() => { - idleCallbacks.delete(depsCallbackID); - // Install package dependencies - require('atom-package-deps').install('linter-tslint'); - }); - idleCallbacks.add(depsCallbackID); - - this.subscriptions = new CompositeDisposable(); - this.workerHelper = new WorkerHelper(); - - // Config subscriptions - this.subscriptions.add( - atom.config.observe('linter-tslint.rulesDirectory', async (dir) => { - if (dir && path.isAbsolute(dir)) { - const stats = await stat(dir); - if (stats && stats.isDirectory()) { - config.rulesDirectory = dir; - this.workerHelper.changeConfig('rulesDirectory', dir); - } - } - }), - atom.config.observe('linter-tslint.useLocalTslint', (use) => { - config.useLocalTslint = use; - this.workerHelper.changeConfig('useLocalTslint', use); - }), - atom.config.observe('linter-tslint.enableSemanticRules', (enableSemanticRules) => { - config.enableSemanticRules = enableSemanticRules; - this.workerHelper.changeConfig('enableSemanticRules', enableSemanticRules); - }), - atom.config.observe('linter-tslint.useGlobalTslint', (use) => { - config.useGlobalTslint = use; - this.workerHelper.changeConfig('useGlobalTslint', use); - }), - atom.config.observe('linter-tslint.globalNodePath', (globalNodePath) => { - config.globalNodePath = globalNodePath; - this.workerHelper.changeConfig('globalNodePath', globalNodePath); - }), - atom.config.observe('linter-tslint.ignoreTypings', (ignoreTypings) => { - this.ignoreTypings = ignoreTypings; - }), - atom.workspace.observeTextEditors((textEditor) => { - // Marks each TypeScript editor with a CSS class so that - // we can enable commands only for TypeScript editors. - const rootScopes = textEditor.getRootScopeDescriptor().getScopesArray(); - if (rootScopes.some((scope) => grammarScopes.includes(scope))) { - atom.views.getView(textEditor).classList.add(editorClass); - textEditor.onDidSave(async () => { - if (atom.config.get('linter-tslint.fixOnSave')) { - if (!this.workerHelper.isRunning()) { - // Wait for worker to initialize - await waitOnIdle(); - } - - await this.workerHelper.requestJob('fix', textEditor); - } - }); - } - }), - atom.commands.add(`atom-text-editor.${editorClass}`, { - // Command subscriptions - 'linter-tslint:fix-file': async () => { - const textEditor = atom.workspace.getActiveTextEditor(); - - if (!textEditor || textEditor.isModified()) { - // Abort for invalid or unsaved text editors - atom.notifications.addError('Linter-TSLint: Please save before fixing'); - return; - } +const subscriptions = new CompositeDisposable(); +const workerHelper = new WorkerHelper(); - // The fix replaces the file content and the cursor can jump automatically - // to the beginning of the file, so save current cursor position - const cursorPosition = textEditor.getCursorBufferPosition(); +export function activate() { + const depsCallbackID = window.requestIdleCallback(() => { + idleCallbacks.delete(depsCallbackID); + // Install package dependencies + require('atom-package-deps').install('linter-tslint'); + }); + idleCallbacks.add(depsCallbackID); - try { - const results = await this.workerHelper.requestJob('fix', textEditor); - const notificationText = results && results.length === 0 - ? 'Linter-TSLint: Fix complete.' - : 'Linter-TSLint: Fix attempt complete, but linting errors remain.'; + // Config subscriptions + subscriptions.add( + atom.config.observe('linter-tslint.rulesDirectory', async (dir) => { + if (dir && path.isAbsolute(dir)) { + const stats = await stat(dir); + if (stats && stats.isDirectory()) { + config.rulesDirectory = dir; + workerHelper.changeConfig('rulesDirectory', dir); + } + } + }), + atom.config.observe('linter-tslint.useLocalTslint', (use) => { + config.useLocalTslint = use; + workerHelper.changeConfig('useLocalTslint', use); + }), + atom.config.observe('linter-tslint.enableSemanticRules', (enableSemanticRules) => { + config.enableSemanticRules = enableSemanticRules; + workerHelper.changeConfig('enableSemanticRules', enableSemanticRules); + }), + atom.config.observe('linter-tslint.useGlobalTslint', (use) => { + config.useGlobalTslint = use; + workerHelper.changeConfig('useGlobalTslint', use); + }), + atom.config.observe('linter-tslint.globalNodePath', (globalNodePath) => { + config.globalNodePath = globalNodePath; + workerHelper.changeConfig('globalNodePath', globalNodePath); + }), + atom.config.observe('linter-tslint.ignoreTypings', (ignoreTypings) => { + config.ignoreTypings = ignoreTypings; + }), + atom.workspace.observeTextEditors((textEditor) => { + // Marks each TypeScript editor with a CSS class so that + // we can enable commands only for TypeScript editors. + const rootScopes = textEditor.getRootScopeDescriptor().getScopesArray(); + if (rootScopes.some((scope) => grammarScopes.includes(scope))) { + atom.views.getView(textEditor).classList.add(editorClass); + textEditor.onDidSave(async () => { + if (atom.config.get('linter-tslint.fixOnSave')) { + if (!workerHelper.isRunning()) { + // Wait for worker to initialize + await waitOnIdle(); + } - atom.notifications.addSuccess(notificationText); - } catch (err) { - atom.notifications.addWarning(err.message); - } finally { - // Restore cursor to the position before fix job - textEditor.setCursorBufferPosition(cursorPosition); + await workerHelper.requestJob('fix', textEditor); } - }, - }), - ); - - const createWorkerCallback = window.requestIdleCallback(() => { - this.workerHelper.startWorker(config); - idleCallbacks.delete(createWorkerCallback); - }); - idleCallbacks.add(createWorkerCallback); - }, - - deactivate() { - idleCallbacks.forEach((callbackID) => window.cancelIdleCallback(callbackID)); - idleCallbacks.clear(); - this.subscriptions.dispose(); - - this.workerHelper.terminateWorker(); - }, - - provideLinter() { - return { - name: 'TSLint', - grammarScopes, - scope: 'file', - lintsOnChange: true, - lint: async (textEditor: TextEditor) => { - if (this.ignoreTypings && textEditor.getPath().toLowerCase().endsWith('.d.ts')) { - return []; + }); + } + }), + atom.commands.add(`atom-text-editor.${editorClass}`, { + // Command subscriptions + 'linter-tslint:fix-file': async () => { + const textEditor = atom.workspace.getActiveTextEditor(); + + if (!textEditor || textEditor.isModified()) { + // Abort for invalid or unsaved text editors + atom.notifications.addError('Linter-TSLint: Please save before fixing'); + return; } - if (!this.workerHelper.isRunning()) { - // Wait for worker to initialize - await waitOnIdle(); - } + // The fix replaces the file content and the cursor can jump automatically + // to the beginning of the file, so save current cursor position + const cursorPosition = textEditor.getCursorBufferPosition(); - const text = textEditor.getText(); - const results = await this.workerHelper.requestJob('lint', textEditor); + try { + const results = await workerHelper.requestJob('fix', textEditor); - if (textEditor.getText() !== text) { - // Text has been modified since the lint was triggered, tell linter not to update - return null; - } + const notificationText = results && results.length === 0 + ? 'Linter-TSLint: Fix complete.' + : 'Linter-TSLint: Fix attempt complete, but linting errors remain.'; - return results; + atom.notifications.addSuccess(notificationText); + } catch (err) { + atom.notifications.addWarning(err.message); + } finally { + // Restore cursor to the position before fix job + textEditor.setCursorBufferPosition(cursorPosition); + } }, - }; - }, -}; -export default TsLintPackage; + }), + ); + + const createWorkerCallback = window.requestIdleCallback(() => { + workerHelper.startWorker(config); + idleCallbacks.delete(createWorkerCallback); + }); + idleCallbacks.add(createWorkerCallback); +} + +export function deactivate() { + idleCallbacks.forEach((callbackID) => window.cancelIdleCallback(callbackID)); + idleCallbacks.clear(); + subscriptions.dispose(); + + workerHelper.terminateWorker(); +} + +export function provideLinter() { + return { + name: 'TSLint', + grammarScopes, + scope: 'file', + lintsOnChange: true, + lint: async (textEditor: TextEditor) => { + if (config.ignoreTypings && (textEditor.getPath() ?? "").toLowerCase().endsWith('.d.ts')) { + return []; + } + + if (!workerHelper.isRunning()) { + // Wait for worker to initialize + await waitOnIdle(); + } + + const text = textEditor.getText(); + const results = await workerHelper.requestJob('lint', textEditor); + + if (textEditor.getText() !== text) { + // Text has been modified since the lint was triggered, tell linter not to update + return null; + } + + return results; + }, + }; +} + +export { config } from './config'; diff --git a/lib/module_types/consistent_path.d.ts b/lib/module_types/consistent_path.d.ts new file mode 100644 index 00000000..9c1bc988 --- /dev/null +++ b/lib/module_types/consistent_path.d.ts @@ -0,0 +1,7 @@ +declare module "consistent-path" { + const getPath: { + (): string; + async(): Promise; + } + export = getPath; +} diff --git a/lib/module_types/tslint-rule-documentation.d.ts b/lib/module_types/tslint-rule-documentation.d.ts new file mode 100644 index 00000000..725d2db3 --- /dev/null +++ b/lib/module_types/tslint-rule-documentation.d.ts @@ -0,0 +1,10 @@ +declare module "tslint-rule-documentation" { + export interface IRuleResult { + found: boolean; // true if the rule is a TSLint core rule, or a known plugin rule, false otherwise + uri: string; // If found is true, uri of the documentation of the rule. If found is false, uri of the contribution guidelines + } + /** Find the url for the documentation of a TSLint rule + * @param {string} ruleID The ID of a TSLint rule such as `no-var-keyword` or `__example/foo` + */ + export function getRuleUri(ruleID: string): IRuleResult +} diff --git a/lib/tsconfig.json b/lib/tsconfig.json index fcedc875..501ba3fc 100644 --- a/lib/tsconfig.json +++ b/lib/tsconfig.json @@ -1,13 +1,13 @@ { "compilerOptions": { - "strict": false, - "strictNullChecks": false, - "noUnusedLocals": false, - "noUnusedParameters": false, - "noImplicitReturns": false, - "noImplicitAny": false, - "noImplicitThis": false, - "noFallthroughCasesInSwitch": false, + "strict": true, + "strictNullChecks": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noImplicitAny": true, + "noImplicitThis": true, + "noFallthroughCasesInSwitch": true, "declaration": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, diff --git a/lib/worker.ts b/lib/worker.ts index 0dbcb61b..e632bfdf 100644 --- a/lib/worker.ts +++ b/lib/worker.ts @@ -6,6 +6,8 @@ import path from 'path'; import { getRuleUri } from 'tslint-rule-documentation'; import ChildProcess from 'child_process'; import getPath from 'consistent-path'; +import { shim } from "./compat-shim"; +import { defaultConfig } from "./config" import type { ConfigSchema } from "./config" import type { emit } from 'node:cluster'; import type * as Tslint from "tslint"; @@ -16,42 +18,11 @@ process.title = 'linter-tslint worker'; const tslintModuleName = 'tslint'; const tslintCache = new Map(); -const config: ConfigSchema = { - useLocalTslint: false, -}; +const config: ConfigSchema = { ...defaultConfig } // copy of default config let fallbackLinter: typeof Tslint.Linter; let requireResolve: typeof import("resolve"); -/** - * Shim for TSLint v3 interoperability - * @param {Function} Linter TSLint v3 linter - * @return {Function} TSLint v4-compatible linter - */ -function shim(Linter: Function): typeof Tslint.Linter { - function LinterShim(options) { - this.options = options; - this.results = {}; - } - - // Assign class properties - Object.assign(LinterShim, Linter); - - // Assign instance methods - LinterShim.prototype = { - ...Linter.prototype, - lint(filePath, text, configuration) { - const options = { ...this.options, configuration }; - const linter = new Linter(filePath, text, options); - this.results = linter.lint(); - }, - getResult() { - return this.results; - }, - }; - - return LinterShim; -} function resolveAndCacheLinter(fileDir: string, moduleDir?: string): Promise { const basedir = moduleDir || fileDir; @@ -234,7 +205,7 @@ async function lint(content: string, filePath: string, options: Tslint.ILinterOp return []; } - return lintResult["failures"].map((failure: Tslint.RuleFailure) => { + return lintResult.failures.map((failure: Tslint.RuleFailure) => { const ruleUri = getRuleUri(failure.getRuleName()); const startPosition = failure.getStartPosition().getLineAndCharacter(); const endPosition = failure.getEndPosition().getLineAndCharacter(); @@ -261,6 +232,7 @@ async function TsLintWorker(initialConfig: ConfigSchema) { process.on('message', async (message: JobMessage | ConfigMessage) => { if (message.messageType === 'config') { + // set the config for the worker config[message.message.key] = message.message.value; if (message.message.key === 'useLocalTslint') { diff --git a/lib/workerHelper.ts b/lib/workerHelper.ts index 620b36db..a7492930 100644 --- a/lib/workerHelper.ts +++ b/lib/workerHelper.ts @@ -1,9 +1,10 @@ import { Task, TextEditor } from 'atom'; import type { ConfigSchema } from "./config" import cryptoRandomString from 'crypto-random-string'; +import type * as Tslint from "tslint"; export class WorkerHelper { - workerInstance: Task + workerInstance: Task | null constructor() { this.workerInstance = null; } @@ -35,14 +36,17 @@ export class WorkerHelper { } } - async requestJob(jobType: string, textEditor: TextEditor) { - if (!this.workerInstance) { + async requestJob(jobType: string, textEditor: TextEditor): Promise { + if (this.workerInstance === null) { throw new Error("Worker hasn't started"); } const emitKey = await cryptoRandomString.async({ length: 10 }); return new Promise((resolve, reject) => { + if (this.workerInstance === null) { + throw new Error("Worker hasn't started"); + } const errSub = this.workerInstance.on('task:error', (...err) => { // Re-throw errors from the task const error = new Error(err[0]); @@ -51,7 +55,7 @@ export class WorkerHelper { reject(error); }); - const responseSub = this.workerInstance.on(emitKey, (data) => { + const responseSub = this.workerInstance.on(emitKey, (data: Tslint.LintResult[]) => { errSub.dispose(); responseSub.dispose(); resolve(data); @@ -77,8 +81,8 @@ export class WorkerHelper { export type ConfigMessage = { messageType: 'config', message: { - key: string, - value: any, + key: keyof ConfigSchema, + value: boolean | string | null, } } diff --git a/package.json b/package.json index 313cf095..7462968a 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,10 @@ "test.lint": "eslint .", "test": "npm run build && atom --test spec", "clean": "shx rm -rf dist", - "dev": "npm run build -- --watch", - "build": "tsc -p lib/tsconfig.json || echo done", + "tsc.dev": "npm run build -- --watch", + "tsc.build": "tsc -p lib/tsconfig.json || echo done", + "dev": "npm run clean && cross-env NODE_ENV=development rollup -c -w", + "build": "npm run clean && cross-env NODE_ENV=production rollup -c", "build-commit": "build-commit -o dist", "prepare": "npm run build" }, @@ -59,9 +61,12 @@ "@types/node": "^14.14.37", "@types/resolve": "^1.20.0", "build-commit": "^0.1.4", + "cross-env": "^7.0.3", "eslint": "7.23.0", "eslint-config-atomic": "^1.12.5", "jasmine-fix": "1.3.1", + "rollup": "^2.44.0", + "rollup-plugin-atomic": "^2.2.0", "shx": "^0.3.3" }, "eslintConfig": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c2558d63..8217d699 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,12 +7,15 @@ specifiers: atom-package-deps: 7.2.3 build-commit: ^0.1.4 consistent-path: 2.0.3 + cross-env: ^7.0.3 crypto-random-string: 3.3.1 eslint: 7.23.0 eslint-config-atomic: ^1.12.5 jasmine-fix: 1.3.1 loophole: 1.1.0 resolve: 1.20.0 + rollup: ^2.44.0 + rollup-plugin-atomic: ^2.2.0 shx: ^0.3.3 tslint: 5.20.1 tslint-rule-documentation: 1.0.3 @@ -33,9 +36,12 @@ devDependencies: '@types/node': 14.14.37 '@types/resolve': 1.20.0 build-commit: 0.1.4 + cross-env: 7.0.3 eslint: 7.23.0 eslint-config-atomic: 1.12.5_eslint@7.23.0 jasmine-fix: 1.3.1 + rollup: 2.44.0 + rollup-plugin-atomic: 2.2.0_efcd15ed4dbe2aad5f083d29b5019c50 shx: 0.3.3 packages: @@ -280,12 +286,134 @@ packages: fastq: 1.11.0 dev: true + /@rollup/plugin-babel/5.3.0_5e7fd6efeecd0601cdf62a5dd59ff63a: + resolution: {integrity: sha512-9uIC8HZOnVLrLHxayq/PTzw+uS25E14KPUBh5ktF+18Mjo5yK0ToMMx6epY0uEgkjwJw0aBW4x2horYXh8juWw==} + engines: {node: '>= 10.0.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@types/babel__core': ^7.1.9 + rollup: ^1.20.0||^2.0.0 + peerDependenciesMeta: + '@types/babel__core': + optional: true + dependencies: + '@babel/core': 7.13.14 + '@babel/helper-module-imports': 7.13.12 + '@rollup/pluginutils': 3.1.0_rollup@2.44.0 + rollup: 2.44.0 + dev: true + + /@rollup/plugin-commonjs/18.0.0_rollup@2.44.0: + resolution: {integrity: sha512-fj92shhg8luw7XbA0HowAqz90oo7qtLGwqTKbyZ8pmOyH8ui5e+u0wPEgeHLH3djcVma6gUCUrjY6w5R2o1u6g==} + engines: {node: '>= 8.0.0'} + peerDependencies: + rollup: ^2.30.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.44.0 + commondir: 1.0.1 + estree-walker: 2.0.2 + glob: 7.1.6 + is-reference: 1.2.1 + magic-string: 0.25.7 + resolve: 1.20.0 + rollup: 2.44.0 + dev: true + + /@rollup/plugin-json/4.1.0_rollup@2.44.0: + resolution: {integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==} + peerDependencies: + rollup: ^1.20.0 || ^2.0.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.44.0 + rollup: 2.44.0 + dev: true + + /@rollup/plugin-node-resolve/11.2.1_rollup@2.44.0: + resolution: {integrity: sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==} + engines: {node: '>= 10.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.44.0 + '@types/resolve': 1.17.1 + builtin-modules: 3.2.0 + deepmerge: 4.2.2 + is-module: 1.0.0 + resolve: 1.20.0 + rollup: 2.44.0 + dev: true + + /@rollup/plugin-replace/2.4.2_rollup@2.44.0: + resolution: {integrity: sha512-IGcu+cydlUMZ5En85jxHH4qj2hta/11BHq95iHEyb2sbgiN0eCdzvUcHw5gt9pBL5lTi4JDYJ1acCoMGpTvEZg==} + peerDependencies: + rollup: ^1.20.0 || ^2.0.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.44.0 + magic-string: 0.25.7 + rollup: 2.44.0 + dev: true + + /@rollup/plugin-typescript/8.2.1_ad28fe470f8da8a1474fbb07c029e4b1: + resolution: {integrity: sha512-Qd2E1pleDR4bwyFxqbjt4eJf+wB0UKVMLc7/BAFDGVdAXQMCsD4DUv5/7/ww47BZCYxWtJqe1Lo0KVNswBJlRw==} + engines: {node: '>=8.0.0'} + peerDependencies: + rollup: ^2.14.0 + tslib: '*' + typescript: '>=3.7.0' + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.44.0 + resolve: 1.20.0 + rollup: 2.44.0 + tslib: 2.1.0 + typescript: 4.2.3 + dev: true + + /@rollup/plugin-wasm/5.1.2_rollup@2.44.0: + resolution: {integrity: sha512-eiOuMHBNY0EGTq3LCebg4IQ6/SOvKjmGetzqKajJWcbDQkrQZvHihZKKnBJYY7NuuvjNqCLdEViYr5aAZms63g==} + engines: {node: '>=10.0.0'} + peerDependencies: + rollup: ^1.20.0 || ^2.0.0 + dependencies: + rollup: 2.44.0 + dev: true + + /@rollup/pluginutils/3.1.0_rollup@2.44.0: + resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==} + engines: {node: '>= 8.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0 + dependencies: + '@types/estree': 0.0.39 + estree-walker: 1.0.1 + picomatch: 2.2.2 + rollup: 2.44.0 + dev: true + + /@rollup/pluginutils/4.1.0_rollup@2.44.0: + resolution: {integrity: sha512-TrBhfJkFxA+ER+ew2U2/fHbebhLT/l/2pRk0hfj9KusXUuRXd2v0R58AfaZK9VXDQ4TogOSEmICVrQAA3zFnHQ==} + engines: {node: '>= 8.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0 + dependencies: + estree-walker: 2.0.2 + picomatch: 2.2.2 + rollup: 2.44.0 + dev: true + /@types/atom/1.40.10: resolution: {integrity: sha512-aNFUhCuR6nmTTMoYKfWWMifZ3IcNETLWC75hCdg3i1/OvirfR/5qm1wfiISBb4s/TPM2YVEtxytCdWhKJuEhzw==} dependencies: '@types/node': 14.14.37 dev: true + /@types/estree/0.0.39: + resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==} + dev: true + + /@types/estree/0.0.47: + resolution: {integrity: sha512-c5ciR06jK8u9BstrmJyO97m+klJrrhCf9u3rLu3DEAJBirxRqSCvDQoYKmxuYwQI5SZChAWu+tq9oVlGRuzPAg==} + dev: true + /@types/json-schema/7.0.7: resolution: {integrity: sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==} dev: true @@ -298,6 +426,12 @@ packages: resolution: {integrity: sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw==} dev: true + /@types/resolve/1.17.1: + resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} + dependencies: + '@types/node': 14.14.37 + dev: true + /@types/resolve/1.20.0: resolution: {integrity: sha512-SFT3jdUNlLkjxUWwH/0QjLiEsV38hjdDX8oMcX9jZAD8KWNzRLdg6INZE7UMz9O86b2BOHzA3dR8nF+DbonX2Q==} dev: true @@ -473,6 +607,14 @@ packages: color-convert: 2.0.1 dev: true + /anymatch/3.1.1: + resolution: {integrity: sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==} + engines: {node: '>= 8'} + dependencies: + normalize-path: 3.0.0 + picomatch: 2.2.2 + dev: true + /argparse/1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} dependencies: @@ -490,6 +632,10 @@ packages: '@babel/runtime-corejs3': 7.13.10 dev: true + /array-includes-any/2.7.3: + resolution: {integrity: sha512-21nzE/CDacWDA3F9xadfIKN4P3rK5Qxt0woP3x7X7krKAfHVwhMikgkZ+h8YfWcoD/A7YnKID7rC5mtWRkqfPA==} + dev: true + /array-includes/3.1.3: resolution: {integrity: sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==} engines: {node: '>= 0.4'} @@ -525,6 +671,15 @@ packages: function-bind: 1.1.1 dev: true + /assemblyscript/0.18.21: + resolution: {integrity: sha512-qZgfAT0CKzd854db1nwDbs1u9XwyWfXPC/hYJxADNRQBJ8oToJ/NX/KPHBR/oMxwY/VEygFBoPVqfCUZYTg1JA==} + hasBin: true + dependencies: + binaryen: 100.0.0 + long: 4.0.0 + dev: true + optional: true + /ast-types-flow/0.0.7: resolution: {integrity: sha1-9wtzXGvKGlycItmCw+Oef+ujva0=} dev: true @@ -534,6 +689,12 @@ packages: engines: {node: '>=8'} dev: true + /atob/2.1.2: + resolution: {integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==} + engines: {node: '>= 4.5.0'} + hasBin: true + dev: true + /atom-package-deps/7.2.3: resolution: {integrity: sha512-Z1FHJS2c2xBN3wQVniG7jXDyE4mUjZlHA0tfIkCND9U/fHaZyBJPno4/jD8PtYUnhlymaHRbCsgxCU3QuKjqfQ==} hasBin: true @@ -640,6 +801,17 @@ packages: /balanced-match/1.0.0: resolution: {integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c=} + /binary-extensions/2.2.0: + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + engines: {node: '>=8'} + dev: true + + /binaryen/100.0.0: + resolution: {integrity: sha512-nxOt8d8/VXAuSVEtAWUdKrqpqCy365QqD223EzzB1GzS5himiZAfM/R5lXx+M/5q8TB8cYp3tYxv5rTjNTJveQ==} + hasBin: true + dev: true + optional: true + /brace-expansion/1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -665,6 +837,10 @@ packages: node-releases: 1.1.71 dev: true + /buffer-from/1.1.1: + resolution: {integrity: sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==} + dev: true + /build-commit/0.1.4: resolution: {integrity: sha512-LpdIncz6SaYSRormDsK2M6hBcCq8ZMpGZnIcZHUCOU4RTjTLgGRch9WK16iWy+9ngQsJGvfsal+aD0tt1vT74g==} engines: {node: '>=6'} @@ -680,6 +856,22 @@ packages: engines: {node: '>=0.10.0'} dev: false + /builtin-modules/2.0.0: + resolution: {integrity: sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==} + engines: {node: '>=4'} + dev: true + + /builtin-modules/3.2.0: + resolution: {integrity: sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==} + engines: {node: '>=6'} + dev: true + + /builtins/2.0.1: + resolution: {integrity: sha512-XkkVe5QAb6guWPXTzpSrYpSlN3nqEmrrE2TkAr/tp7idSF6+MONh9WvKrAuR3HiKLvoSgmbs8l1U9IPmMrIoLw==} + dependencies: + semver: 6.3.0 + dev: true + /call-bind/1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: @@ -723,6 +915,28 @@ packages: supports-color: 7.2.0 dev: true + /chokidar/3.5.1: + resolution: {integrity: sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.1 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.1 + normalize-path: 3.0.0 + readdirp: 3.5.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /clap/1.2.3: + resolution: {integrity: sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==} + engines: {node: '>=0.10.0'} + dependencies: + chalk: 1.1.3 + dev: true + /cli/1.0.1: resolution: {integrity: sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=} engines: {node: '>=0.2.5'} @@ -731,6 +945,14 @@ packages: glob: 7.1.6 dev: true + /cliui/7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + dependencies: + string-width: 4.2.2 + strip-ansi: 6.0.0 + wrap-ansi: 7.0.0 + dev: true + /coffeescript/1.12.7: resolution: {integrity: sha512-pLXHFxQMPklVoEekowk8b3erNynC+DVJzChxS/LCBBgR6/8AJkHivkm//zbowcfc7BTCAjryuhx6gPqPRfsFoA==} engines: {node: '>=0.8.0'} @@ -773,13 +995,16 @@ packages: /commander/2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - dev: false /commander/7.2.0: resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} engines: {node: '>= 10'} dev: true + /commondir/1.0.1: + resolution: {integrity: sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=} + dev: true + /concat-map/0.0.1: resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} @@ -831,6 +1056,14 @@ packages: resolution: {integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=} dev: true + /cross-env/7.0.3: + resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} + engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} + hasBin: true + dependencies: + cross-spawn: 7.0.3 + dev: true + /cross-spawn/7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -847,6 +1080,32 @@ packages: type-fest: 0.8.1 dev: false + /css-tree/1.1.3: + resolution: {integrity: sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==} + engines: {node: '>=8.0.0'} + dependencies: + mdn-data: 2.0.14 + source-map: 0.6.1 + dev: true + + /csso-cli/3.0.0: + resolution: {integrity: sha512-j0ytVZ8qHXcFnR3HOvfH8RWOeHtlqwt97mYe32AnJ2yG6noqV0Jsn8OwOQq8wpdavkHr8JOx6drRtY2HoKLjqw==} + engines: {node: '>=8.0.0'} + hasBin: true + dependencies: + chokidar: 3.5.1 + clap: 1.2.3 + csso: 4.2.0 + source-map: 0.6.1 + dev: true + + /csso/4.2.0: + resolution: {integrity: sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==} + engines: {node: '>=8.0.0'} + dependencies: + css-tree: 1.1.3 + dev: true + /damerau-levenshtein/1.0.6: resolution: {integrity: sha512-JVrozIeElnj3QzfUIt8tB8YMluBJom4Vw9qTPpjGYQ9fYlB3D/rb6OordUxf3xeFB35LKWs0xqcO5U6ySvBtug==} dev: true @@ -873,10 +1132,20 @@ packages: ms: 2.1.2 dev: true + /decode-uri-component/0.2.0: + resolution: {integrity: sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=} + engines: {node: '>=0.10'} + dev: true + /deep-is/0.1.3: resolution: {integrity: sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=} dev: true + /deepmerge/4.2.2: + resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} + engines: {node: '>=0.10.0'} + dev: true + /define-properties/1.1.3: resolution: {integrity: sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==} engines: {node: '>= 0.4'} @@ -1386,6 +1655,18 @@ packages: engines: {node: '>=4.0'} dev: true + /estree-walker/0.6.1: + resolution: {integrity: sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==} + dev: true + + /estree-walker/1.0.1: + resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==} + dev: true + + /estree-walker/2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + dev: true + /esutils/2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -1462,6 +1743,13 @@ packages: /fs.realpath/1.0.0: resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + dev: true + optional: true + /function-bind/1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} @@ -1474,6 +1762,11 @@ packages: engines: {node: '>=6.9.0'} dev: true + /get-caller-file/2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + dev: true + /get-intrinsic/1.1.1: resolution: {integrity: sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==} dependencies: @@ -1644,6 +1937,13 @@ packages: resolution: {integrity: sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==} dev: true + /is-binary-path/2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + dependencies: + binary-extensions: 2.2.0 + dev: true + /is-boolean-object/1.1.0: resolution: {integrity: sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==} engines: {node: '>= 0.4'} @@ -1666,6 +1966,12 @@ packages: engines: {node: '>= 0.4'} dev: true + /is-docker/2.1.1: + resolution: {integrity: sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==} + engines: {node: '>=8'} + hasBin: true + dev: true + /is-extglob/2.1.1: resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=} engines: {node: '>=0.10.0'} @@ -1683,6 +1989,10 @@ packages: is-extglob: 2.1.1 dev: true + /is-module/1.0.0: + resolution: {integrity: sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=} + dev: true + /is-negative-zero/2.0.1: resolution: {integrity: sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==} engines: {node: '>= 0.4'} @@ -1698,6 +2008,12 @@ packages: engines: {node: '>=0.12.0'} dev: true + /is-reference/1.2.1: + resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} + dependencies: + '@types/estree': 0.0.47 + dev: true + /is-regex/1.1.2: resolution: {integrity: sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==} engines: {node: '>= 0.4'} @@ -1718,6 +2034,13 @@ packages: has-symbols: 1.0.2 dev: true + /is-wsl/2.2.0: + resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} + engines: {node: '>=8'} + dependencies: + is-docker: 2.1.1 + dev: true + /isarray/0.0.1: resolution: {integrity: sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=} dev: true @@ -1734,6 +2057,15 @@ packages: resolution: {integrity: sha512-jxfPMW5neQUrgEZR7FIXp1UAberYAHkpWTmdSfN/ulU+sC/yUsB827tRiwGUaUyw+1kNC5jqcINst0FF8tvVvg==} dev: true + /jest-worker/26.6.2: + resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} + engines: {node: '>= 10.13.0'} + dependencies: + '@types/node': 14.14.37 + merge-stream: 2.0.0 + supports-color: 7.2.0 + dev: true + /js-tokens/3.0.2: resolution: {integrity: sha1-mGbfOVECEw449/mWvOtlRDIJwls=} dev: true @@ -1775,6 +2107,10 @@ packages: strip-json-comments: 1.0.4 dev: true + /json-parse-better-errors/1.0.2: + resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} + dev: true + /json-schema-traverse/0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true @@ -1850,6 +2186,16 @@ packages: strip-bom: 3.0.0 dev: true + /load-json-file/4.0.0: + resolution: {integrity: sha1-L19Fq5HjMhYjT9U62rZo607AmTs=} + engines: {node: '>=4'} + dependencies: + graceful-fs: 4.2.6 + parse-json: 4.0.0 + pify: 3.0.0 + strip-bom: 3.0.0 + dev: true + /locate-path/2.0.0: resolution: {integrity: sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=} engines: {node: '>=4'} @@ -1878,6 +2224,11 @@ packages: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} dev: true + /long/4.0.0: + resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} + dev: true + optional: true + /loophole/1.1.0: resolution: {integrity: sha1-N5Sf6kU7YlasxyXDIM4MWn9wor0=} dev: false @@ -1896,6 +2247,20 @@ packages: yallist: 4.0.0 dev: true + /magic-string/0.25.7: + resolution: {integrity: sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==} + dependencies: + sourcemap-codec: 1.4.8 + dev: true + + /mdn-data/2.0.14: + resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==} + dev: true + + /merge-stream/2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + dev: true + /merge2/1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} @@ -1932,6 +2297,12 @@ packages: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true + /nanoid/3.1.22: + resolution: {integrity: sha512-/2ZUaJX2ANuLtTvqTlgqBQNJoQO398KyJgZloL0PZkC0dpysjncRUPsFe3DUPzz/y3h+u7C46np8RMuvF3jsSQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + /natural-compare/1.4.0: resolution: {integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=} dev: true @@ -1949,6 +2320,11 @@ packages: validate-npm-package-license: 3.0.4 dev: true + /normalize-path/3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + dev: true + /object-assign/4.1.1: resolution: {integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=} engines: {node: '>=0.10.0'} @@ -2008,6 +2384,14 @@ packages: dependencies: wrappy: 1.0.2 + /open/7.4.2: + resolution: {integrity: sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==} + engines: {node: '>=8'} + dependencies: + is-docker: 2.1.1 + is-wsl: 2.2.0 + dev: true + /optionator/0.9.1: resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} engines: {node: '>= 0.8.0'} @@ -2053,6 +2437,14 @@ packages: error-ex: 1.3.2 dev: true + /parse-json/4.0.0: + resolution: {integrity: sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=} + engines: {node: '>=4'} + dependencies: + error-ex: 1.3.2 + json-parse-better-errors: 1.0.2 + dev: true + /path-exists/3.0.0: resolution: {integrity: sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=} engines: {node: '>=4'} @@ -2077,6 +2469,13 @@ packages: pify: 2.3.0 dev: true + /path-type/3.0.0: + resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} + engines: {node: '>=4'} + dependencies: + pify: 3.0.0 + dev: true + /path-type/4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -2092,6 +2491,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /pify/3.0.0: + resolution: {integrity: sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=} + engines: {node: '>=4'} + dev: true + /pkg-dir/2.0.0: resolution: {integrity: sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=} engines: {node: '>=4'} @@ -2132,6 +2536,12 @@ packages: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true + /randombytes/2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + dependencies: + safe-buffer: 5.2.1 + dev: true + /react-is/16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} dev: true @@ -2153,6 +2563,15 @@ packages: path-type: 2.0.0 dev: true + /read-pkg/3.0.0: + resolution: {integrity: sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=} + engines: {node: '>=4'} + dependencies: + load-json-file: 4.0.0 + normalize-package-data: 2.5.0 + path-type: 3.0.0 + dev: true + /readable-stream/1.1.14: resolution: {integrity: sha1-fPTFTvZI44EwhMY23SB54WbAgdk=} dependencies: @@ -2162,6 +2581,13 @@ packages: string_decoder: 0.10.31 dev: true + /readdirp/3.5.0: + resolution: {integrity: sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==} + engines: {node: '>=8.10.0'} + dependencies: + picomatch: 2.2.2 + dev: true + /rechoir/0.6.2: resolution: {integrity: sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=} engines: {node: '>= 0.10'} @@ -2195,6 +2621,11 @@ packages: engines: {node: '>=8'} dev: true + /require-directory/2.1.1: + resolution: {integrity: sha1-jGStX9MNqxyXbiNE/+f3kqam30I=} + engines: {node: '>=0.10.0'} + dev: true + /require-from-string/2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} @@ -2235,6 +2666,154 @@ packages: glob: 7.1.6 dev: true + /rollup-plugin-assemblyscript/2.0.0_assemblyscript@0.18.21: + resolution: {integrity: sha512-DyhJQKJ6Y2RWqPCF+dRW8ectzV374zRQg+MQ+uplgyZKx8TUoLrtfRCCAfuL2P4ry3yNiQhN8VoBM+JpOi7H6A==} + peerDependencies: + as-bind: '*' + assemblyscript: '*' + dependencies: + assemblyscript: 0.18.21 + dev: true + + /rollup-plugin-atomic/2.2.0_efcd15ed4dbe2aad5f083d29b5019c50: + resolution: {integrity: sha512-YFHG7kWGKbhAQx2TVd5JS8LuTyAeiXq9psbHpKKThLFzCGw5KuJg9gvTY2pr7+Wml4CATtSDUNJrZoSHdXMJnw==} + peerDependencies: + rollup: ^2 + dependencies: + '@rollup/plugin-babel': 5.3.0_5e7fd6efeecd0601cdf62a5dd59ff63a + '@rollup/plugin-commonjs': 18.0.0_rollup@2.44.0 + '@rollup/plugin-json': 4.1.0_rollup@2.44.0 + '@rollup/plugin-node-resolve': 11.2.1_rollup@2.44.0 + '@rollup/plugin-replace': 2.4.2_rollup@2.44.0 + '@rollup/plugin-typescript': 8.2.1_ad28fe470f8da8a1474fbb07c029e4b1 + '@rollup/plugin-wasm': 5.1.2_rollup@2.44.0 + array-includes-any: 2.7.3 + csso-cli: 3.0.0 + rollup: 2.44.0 + rollup-plugin-assemblyscript: 2.0.0_assemblyscript@0.18.21 + rollup-plugin-auto-external: 2.0.0_rollup@2.44.0 + rollup-plugin-coffee-script: 2.0.0_coffeescript@1.12.7 + rollup-plugin-css-only: 3.1.0_rollup@2.44.0 + rollup-plugin-execute: 1.1.1 + rollup-plugin-sourcemaps: 0.6.3_efcd15ed4dbe2aad5f083d29b5019c50 + rollup-plugin-terser: 7.0.2_rollup@2.44.0 + rollup-plugin-visualizer: 4.2.2_rollup@2.44.0 + tslib: 2.1.0 + optionalDependencies: + '@babel/core': 7.13.14 + assemblyscript: 0.18.21 + coffeescript: 1.12.7 + typescript: 4.2.3 + transitivePeerDependencies: + - '@types/babel__core' + - '@types/node' + - as-bind + - supports-color + dev: true + + /rollup-plugin-auto-external/2.0.0_rollup@2.44.0: + resolution: {integrity: sha512-HQM3ZkZYfSam1uoZtAB9sK26EiAsfs1phrkf91c/YX+S07wugyRXSigBxrIwiLr5EPPilKYmoMxsrnlGBsXnuQ==} + engines: {node: '>=6'} + peerDependencies: + rollup: '>=0.45.2' + dependencies: + builtins: 2.0.1 + read-pkg: 3.0.0 + rollup: 2.44.0 + safe-resolve: 1.0.0 + semver: 5.7.1 + dev: true + + /rollup-plugin-coffee-script/2.0.0_coffeescript@1.12.7: + resolution: {integrity: sha512-7hEjNhf9pezf/4PxHKHF2uEy+sgR1X9R5mCnOoF/ctKpFc5emY0+wYIxBth/0FJAa4F3+MQHOFEVxsuMIlOtUA==} + peerDependencies: + coffeescript: 2.x + dependencies: + coffeescript: 1.12.7 + object-assign: 4.1.1 + rollup-plugin-node-resolve: 3.4.0 + rollup-pluginutils: 2.8.2 + dev: true + + /rollup-plugin-css-only/3.1.0_rollup@2.44.0: + resolution: {integrity: sha512-TYMOE5uoD76vpj+RTkQLzC9cQtbnJNktHPB507FzRWBVaofg7KhIqq1kGbcVOadARSozWF883Ho9KpSPKH8gqA==} + engines: {node: '>=10.12.0'} + peerDependencies: + rollup: 1 || 2 + dependencies: + '@rollup/pluginutils': 4.1.0_rollup@2.44.0 + rollup: 2.44.0 + dev: true + + /rollup-plugin-execute/1.1.1: + resolution: {integrity: sha512-isCNR/VrwlEfWJMwsnmt5TBRod8dW1IjVRxcXCBrxDmVTeA1IXjzeLSS3inFBmRD7KDPlo38KSb2mh5v5BoWgA==} + dev: true + + /rollup-plugin-node-resolve/3.4.0: + resolution: {integrity: sha512-PJcd85dxfSBWih84ozRtBkB731OjXk0KnzN0oGp7WOWcarAFkVa71cV5hTJg2qpVsV2U8EUwrzHP3tvy9vS3qg==} + deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve. + dependencies: + builtin-modules: 2.0.0 + is-module: 1.0.0 + resolve: 1.20.0 + dev: true + + /rollup-plugin-sourcemaps/0.6.3_efcd15ed4dbe2aad5f083d29b5019c50: + resolution: {integrity: sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==} + engines: {node: '>=10.0.0'} + peerDependencies: + '@types/node': '>=10.0.0' + rollup: '>=0.31.2' + peerDependenciesMeta: + '@types/node': + optional: true + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.44.0 + '@types/node': 14.14.37 + rollup: 2.44.0 + source-map-resolve: 0.6.0 + dev: true + + /rollup-plugin-terser/7.0.2_rollup@2.44.0: + resolution: {integrity: sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==} + peerDependencies: + rollup: ^2.0.0 + dependencies: + '@babel/code-frame': 7.12.13 + jest-worker: 26.6.2 + rollup: 2.44.0 + serialize-javascript: 4.0.0 + terser: 5.6.1 + dev: true + + /rollup-plugin-visualizer/4.2.2_rollup@2.44.0: + resolution: {integrity: sha512-10/TsugsaQL5rdynl0lrklBngTtkRBESZdxUJy+3fN+xKqNdg5cr7JQU1OoPx4p5mhQ+nspa6EvX3qc8SsBvnA==} + engines: {node: '>=10'} + hasBin: true + peerDependencies: + rollup: '>=1.20.0' + dependencies: + nanoid: 3.1.22 + open: 7.4.2 + rollup: 2.44.0 + source-map: 0.7.3 + yargs: 16.2.0 + dev: true + + /rollup-pluginutils/2.8.2: + resolution: {integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==} + dependencies: + estree-walker: 0.6.1 + dev: true + + /rollup/2.44.0: + resolution: {integrity: sha512-rGSF4pLwvuaH/x4nAS+zP6UNn5YUDWf/TeEU5IoXSZKBbKRNTCI3qMnYXKZgrC0D2KzS2baiOZt1OlqhMu5rnQ==} + engines: {node: '>=10.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + /run-parallel/1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: @@ -2245,6 +2824,14 @@ packages: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} dev: true + /safe-buffer/5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + dev: true + + /safe-resolve/1.0.0: + resolution: {integrity: sha1-/jT40p16O+z9JJ0KqKeZtcPPZVk=} + dev: true + /semver/5.7.1: resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} hasBin: true @@ -2262,6 +2849,12 @@ packages: lru-cache: 6.0.0 dev: true + /serialize-javascript/4.0.0: + resolution: {integrity: sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==} + dependencies: + randombytes: 2.1.0 + dev: true + /shebang-command/2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -2321,11 +2914,39 @@ packages: is-fullwidth-code-point: 3.0.0 dev: true + /source-map-resolve/0.6.0: + resolution: {integrity: sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==} + dependencies: + atob: 2.1.2 + decode-uri-component: 0.2.0 + dev: true + + /source-map-support/0.5.19: + resolution: {integrity: sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==} + dependencies: + buffer-from: 1.1.1 + source-map: 0.6.1 + dev: true + /source-map/0.5.7: resolution: {integrity: sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=} engines: {node: '>=0.10.0'} dev: true + /source-map/0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: true + + /source-map/0.7.3: + resolution: {integrity: sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==} + engines: {node: '>= 8'} + dev: true + + /sourcemap-codec/1.4.8: + resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} + dev: true + /spdx-correct/3.1.1: resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} dependencies: @@ -2453,6 +3074,16 @@ packages: string-width: 4.2.2 dev: true + /terser/5.6.1: + resolution: {integrity: sha512-yv9YLFQQ+3ZqgWCUk+pvNJwgUTdlIxUk1WTN+RnaFJe2L7ipG2csPT0ra2XRm7Cs8cxN7QXmK1rFzEwYEQkzXw==} + engines: {node: '>=10'} + hasBin: true + dependencies: + commander: 2.20.3 + source-map: 0.7.3 + source-map-support: 0.5.19 + dev: true + /text-table/0.2.0: resolution: {integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=} dev: true @@ -2486,6 +3117,10 @@ packages: /tslib/1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + /tslib/2.1.0: + resolution: {integrity: sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==} + dev: true + /tslint-rule-documentation/1.0.3: resolution: {integrity: sha1-NxY3WzA2WumtU940MWn5agF665A=} dev: false @@ -2628,9 +3263,41 @@ packages: engines: {node: '>=0.10.0'} dev: true + /wrap-ansi/7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.2 + strip-ansi: 6.0.0 + dev: true + /wrappy/1.0.2: resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=} + /y18n/5.0.6: + resolution: {integrity: sha512-PlVX4Y0lDTN6E2V4ES2tEdyvXkeKzxa8c/vo0pxPr/TqbztddTP0yn7zZylIyiAuxerqj0Q5GhpJ1YJCP8LaZQ==} + engines: {node: '>=10'} + dev: true + /yallist/4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: true + + /yargs-parser/20.2.7: + resolution: {integrity: sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==} + engines: {node: '>=10'} + dev: true + + /yargs/16.2.0: + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} + dependencies: + cliui: 7.0.4 + escalade: 3.1.1 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.2 + y18n: 5.0.6 + yargs-parser: 20.2.7 + dev: true diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 00000000..78640a6e --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,33 @@ +import { createPlugins } from "rollup-plugin-atomic" + +const plugins = createPlugins([ + ["ts", { tsconfig: "./lib/tsconfig.json" }, true], + "js", + "json" +]) + +const CommonConfig = { + output: [ + { + dir: "dist", + format: "cjs", + sourcemap: true, + }, + ], + external: ["atom"], + plugins, +} + +const RollupConfig = [ + // Main + { + input: "lib/main.ts", + ...CommonConfig + }, + // Worker + { + input: "lib/worker.ts", + ...CommonConfig + }, +] +export default RollupConfig diff --git a/spec/linter-tslint-spec.js b/spec/linter-tslint-spec.js index e4fec76a..50c4a73c 100644 --- a/spec/linter-tslint-spec.js +++ b/spec/linter-tslint-spec.js @@ -2,7 +2,7 @@ import * as path from 'path'; import { it, beforeEach, afterEach } from 'jasmine-fix'; -import linterTslint from '../dist/main'; +import * as linterTslint from '../dist/main'; // Fixture paths const invalidPath = path.join(__dirname, 'fixtures', 'invalid', 'invalid.ts');