├── .eslintrc
├── .gitignore
├── .npmignore
├── README.md
├── doc
└── atom-import-sort.gif
├── keymaps
└── atom-import-sort.cson
├── lib
├── index.d.ts
└── index.js
├── menus
└── atom-import-sort.cson
├── package.json
├── src
├── index.d.ts
├── index.ts
└── tsconfig.json
├── test
└── index.ts
├── tsconfig.json
├── tslint.json
└── yarn.lock
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../.eslintrc",
3 | "globals": {
4 | "atom": false
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | npm-debug.log
3 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | src
2 | test
3 | tsconfig.json
4 | tslint.json
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # atom-import-sort
2 |
3 | Sort ES2015 (aka ES6) imports directly from within Atom. Both JavaScript and TypeScript are supported.
4 |
5 | 
6 |
7 | After you installed the package you can sort your imports using the Ctrl + Alt + o key binding or trigger it manually from the command palette with the `Import Sort: Sort` command.
8 |
9 | The package also offers a "sort on save" option to automatically sort your imports whenever you save a JavaScript or TypeScript file. It's disabled by default.
10 |
11 | See [`import-sort`](https://github.com/renke/import-sort) for information about customizing the way imports are sorted.
12 |
--------------------------------------------------------------------------------
/doc/atom-import-sort.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renke/atom-import-sort/c4f2d70a6430293b68212aa8c04316fb1b610f8b/doc/atom-import-sort.gif
--------------------------------------------------------------------------------
/keymaps/atom-import-sort.cson:
--------------------------------------------------------------------------------
1 | 'atom-text-editor[data-grammar~="source"][data-grammar~="js"],atom-text-editor[data-grammar~="source"][data-grammar~="ts"]':
2 | 'ctrl-alt-o': 'import-sort:sort'
3 |
--------------------------------------------------------------------------------
/lib/index.d.ts:
--------------------------------------------------------------------------------
1 | import "atom";
2 | export declare class Plugin {
3 | bufferWillSaveDisposables?: any;
4 | editorObserverDisposable?: any;
5 | config: {
6 | sortOnSave: {
7 | title: string;
8 | description: string;
9 | type: string;
10 | default: boolean;
11 | };
12 | };
13 | activate(state: any): void;
14 | deactivate(): void;
15 | private observeEditors();
16 | private unobserveEditors();
17 | private sortEditor(editor, notifyErrors?);
18 | private sortCurrentEditor();
19 | }
20 |
--------------------------------------------------------------------------------
/lib/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | require("atom");
4 | const path_1 = require("path");
5 | const import_sort_1 = require("import-sort");
6 | const import_sort_config_1 = require("import-sort-config");
7 | const loophole_1 = require("loophole");
8 | // tslint:disable-next-line
9 | const CompositeDisposable = require("atom").CompositeDisposable;
10 | class Plugin {
11 | constructor() {
12 | this.config = {
13 | sortOnSave: {
14 | title: "Sort on save",
15 | description: "Automatically sort your Javascript files when you save them.",
16 | type: "boolean",
17 | default: false,
18 | },
19 | };
20 | }
21 | activate(state) {
22 | atom.config.observe("atom-import-sort.sortOnSave", (sortOnSave) => {
23 | if (sortOnSave) {
24 | this.observeEditors();
25 | }
26 | else {
27 | this.unobserveEditors();
28 | }
29 | });
30 | // tslint:disable-next-line
31 | atom.commands.add('atom-text-editor[data-grammar~="source"][data-grammar~="js"],atom-text-editor[data-grammar~="source"][data-grammar~="ts"]', "import-sort:sort", () => this.sortCurrentEditor());
32 | }
33 | deactivate() {
34 | this.unobserveEditors();
35 | }
36 | observeEditors() {
37 | if (!this.editorObserverDisposable) {
38 | this.bufferWillSaveDisposables = new CompositeDisposable();
39 | this.editorObserverDisposable = atom.workspace.observeTextEditors(editor => {
40 | this.bufferWillSaveDisposables.add(editor.getBuffer().onWillSave(() => {
41 | this.sortEditor(editor, true);
42 | }));
43 | });
44 | }
45 | }
46 | unobserveEditors() {
47 | if (this.editorObserverDisposable) {
48 | this.bufferWillSaveDisposables.dispose();
49 | this.editorObserverDisposable.dispose();
50 | this.editorObserverDisposable = null;
51 | }
52 | }
53 | sortEditor(editor, notifyErrors = false) {
54 | const scopeDescriptor = editor.getRootScopeDescriptor();
55 | if (!scopeDescriptor) {
56 | return;
57 | }
58 | const scope = scopeDescriptor.scopes[0];
59 | let extension;
60 | let directory;
61 | const path = editor.getPath();
62 | if (path) {
63 | const rawExtension = path_1.extname(path);
64 | if (rawExtension.indexOf(".") !== -1) {
65 | extension = rawExtension;
66 | }
67 | directory = path_1.dirname(path);
68 | }
69 | else {
70 | // TODO: Refactor the following if statements
71 | if (scope.split(".").some(part => part === "js")) {
72 | extension = ".js";
73 | }
74 | if (scope.split(".").some(part => part === "ts")) {
75 | extension = ".ts";
76 | }
77 | directory = atom.project.getPaths()[0];
78 | }
79 | if (!extension) {
80 | return;
81 | }
82 | try {
83 | const sortConfig = import_sort_config_1.getConfig(extension, directory);
84 | if (!sortConfig) {
85 | if (!notifyErrors) {
86 | atom.notifications.addWarning(`No configuration found for this file type`);
87 | }
88 | return;
89 | }
90 | const { parser, style, config: rawConfig } = sortConfig;
91 | if (!parser || !style) {
92 | if (!parser && !notifyErrors) {
93 | atom.notifications.addWarning(`Parser '${sortConfig.config.parser}' not found`);
94 | }
95 | if (!style && !notifyErrors) {
96 | atom.notifications.addWarning(`Style '${sortConfig.config.style}' not found`);
97 | }
98 | return;
99 | }
100 | const cursor = editor.getCursorBufferPosition();
101 | const unsorted = editor.getText();
102 | let changes;
103 | loophole_1.allowUnsafeNewFunction(() => {
104 | loophole_1.allowUnsafeEval(() => {
105 | changes = import_sort_1.default(unsorted, parser, style, path, rawConfig.options).changes;
106 | });
107 | });
108 | editor.transact(() => {
109 | for (const change of changes) {
110 | const start = editor.buffer.positionForCharacterIndex(change.start);
111 | const end = editor.buffer.positionForCharacterIndex(change.end);
112 | editor.setTextInBufferRange([start, end], change.code);
113 | }
114 | });
115 | editor.setCursorBufferPosition(cursor);
116 | }
117 | catch (e) {
118 | if (!notifyErrors) {
119 | atom.notifications.addWarning(`Failed to sort imports:\n${e.toString()}`);
120 | }
121 | }
122 | }
123 | sortCurrentEditor() {
124 | const editor = atom.workspace.getActiveTextEditor();
125 | if (editor) {
126 | this.sortEditor(editor);
127 | }
128 | }
129 | }
130 | exports.Plugin = Plugin;
131 | module.exports = new Plugin();
132 |
--------------------------------------------------------------------------------
/menus/atom-import-sort.cson:
--------------------------------------------------------------------------------
1 | 'context-menu':
2 | 'atom-text-editor[data-grammar~="source"][data-grammar~="js"], atom-text-editor[data-grammar~="source"][data-grammar~="ts"]': [
3 | {
4 | 'label': 'Sort Imports'
5 | 'command': 'import-sort:sort'
6 | }
7 | ]
8 | 'menu': [
9 | {
10 | 'label': 'Packages'
11 | 'submenu': [
12 | 'label': 'Import Sort'
13 | 'submenu': [
14 | {
15 | 'label': 'Sort Imports'
16 | 'command': 'import-sort:sort'
17 | }
18 | ]
19 | ]
20 | }
21 | ]
22 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "atom-import-sort",
3 | "private": true,
4 | "version": "6.0.0",
5 | "description": "Sort ES2015 (aka ES6) imports. Manually – or automatically when you save your JavaSript or TypeScript files.",
6 | "keywords": [
7 | "es6",
8 | "eslint",
9 | "import-sort",
10 | "import",
11 | "sort",
12 | "typescript"
13 | ],
14 | "main": "lib/index.js",
15 | "typings": "lib/index.d.ts",
16 | "scripts": {
17 | "prepublishOnly": "tsc -b .",
18 | "build": "tsc -b .",
19 | "build:watch": "tsc -b . -w",
20 | "test": "mocha --require ts-node/register --recursive \"test/**/*.ts\"",
21 | "test:watch": "mocha -w --require ts-node/register --recursive \"test/**/*.ts\"",
22 | "lint": "eslint --ext ts src"
23 | },
24 | "author": "Renke Grunwald (https://github.com/renke)",
25 | "repository": "renke/import-sort",
26 | "license": "ISC",
27 | "engines": {
28 | "atom": ">=1.0.0 <2.0.0"
29 | },
30 | "devDependencies": {
31 | "@types/atom": "^1.31.0",
32 | "@types/chai": "^4.0.0",
33 | "@types/mocha": "^5.2.5",
34 | "@types/node": "^10.12.20",
35 | "@typescript-eslint/eslint-plugin": "^1.2.0",
36 | "chai": "^4.0.2",
37 | "eslint": "^5.13.0",
38 | "eslint-config-airbnb": "^17.1.0",
39 | "eslint-config-prettier": "^4.0.0",
40 | "eslint-plugin-import": "^2.16.0",
41 | "eslint-plugin-jsx-a11y": "^6.2.0",
42 | "eslint-plugin-react": "^7.12.4",
43 | "mocha": "^5.2.0",
44 | "ts-node": "^8.0.2",
45 | "typescript": "^3.2.4"
46 | },
47 | "dependencies": {
48 | "import-sort": "^6.0.0",
49 | "import-sort-config": "^6.0.0",
50 | "import-sort-parser-babylon": "^6.0.0",
51 | "import-sort-parser-typescript": "^6.0.0",
52 | "import-sort-style-eslint": "^6.0.0",
53 | "loophole": "^1.1.0"
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/index.d.ts:
--------------------------------------------------------------------------------
1 | declare module "loophole" {
2 | export function allowUnsafeEval(f: () => unknown);
3 | export function allowUnsafeNewFunction(f: () => unknown);
4 | }
5 |
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
1 | import {dirname, extname} from "path";
2 |
3 | import {CompositeDisposable, TextEditor} from "atom"; // eslint-disable-line
4 | import sortImports, {ICodeChange} from "import-sort";
5 | import {getConfig} from "import-sort-config";
6 | import {allowUnsafeEval, allowUnsafeNewFunction} from "loophole";
7 |
8 | // eslint-disable-next-line
9 | export class Plugin {
10 | public bufferWillSaveDisposables;
11 |
12 | public editorObserverDisposable;
13 |
14 | public config = {
15 | sortOnSave: {
16 | title: "Sort on save",
17 | description:
18 | "Automatically sort your Javascript files when you save them.",
19 | type: "boolean",
20 | default: false,
21 | },
22 | };
23 |
24 | public activate() {
25 | atom.config.observe(
26 | "atom-import-sort.sortOnSave",
27 | (sortOnSave: boolean) => {
28 | if (sortOnSave) {
29 | this.observeEditors();
30 | } else {
31 | this.unobserveEditors();
32 | }
33 | },
34 | );
35 |
36 | // tslint:disable-next-line
37 | atom.commands.add(
38 | 'atom-text-editor[data-grammar~="source"][data-grammar~="js"],atom-text-editor[data-grammar~="source"][data-grammar~="ts"]',
39 | "import-sort:sort",
40 | () => this.sortCurrentEditor(),
41 | );
42 | }
43 |
44 | public deactivate() {
45 | this.unobserveEditors();
46 | }
47 |
48 | private observeEditors() {
49 | if (!this.editorObserverDisposable) {
50 | this.bufferWillSaveDisposables = new CompositeDisposable();
51 |
52 | this.editorObserverDisposable = atom.workspace.observeTextEditors(
53 | editor => {
54 | this.bufferWillSaveDisposables.add(
55 | editor.getBuffer().onWillSave(() => {
56 | this.sortEditor(editor, true);
57 | }),
58 | );
59 | },
60 | );
61 | }
62 | }
63 |
64 | private unobserveEditors() {
65 | if (this.editorObserverDisposable) {
66 | this.bufferWillSaveDisposables.dispose();
67 |
68 | this.editorObserverDisposable.dispose();
69 | this.editorObserverDisposable = null;
70 | }
71 | }
72 |
73 | // eslint-disable-next-line
74 | private sortEditor(editor, notifyErrors = false) {
75 | const scopeDescriptor = editor.getRootScopeDescriptor();
76 |
77 | if (!scopeDescriptor) {
78 | return;
79 | }
80 |
81 | const scope = scopeDescriptor.scopes[0];
82 |
83 | let extension: string | undefined;
84 | let directory: string | undefined;
85 |
86 | const path = editor.getPath();
87 |
88 | if (path) {
89 | const rawExtension = extname(path);
90 |
91 | if (rawExtension.indexOf(".") !== -1) {
92 | extension = rawExtension;
93 | }
94 |
95 | directory = dirname(path);
96 | } else {
97 | // TODO: Refactor the following if statements
98 |
99 | if (scope.split(".").some(part => part === "js")) {
100 | extension = ".js";
101 | }
102 |
103 | if (scope.split(".").some(part => part === "ts")) {
104 | extension = ".ts";
105 | }
106 |
107 | [directory] = atom.project.getPaths();
108 | }
109 |
110 | if (!extension) {
111 | return;
112 | }
113 |
114 | try {
115 | const sortConfig = getConfig(extension, directory);
116 |
117 | if (!sortConfig) {
118 | if (!notifyErrors) {
119 | atom.notifications.addWarning(
120 | `No configuration found for this file type`,
121 | );
122 | }
123 |
124 | return;
125 | }
126 |
127 | const {parser, style, config: rawConfig} = sortConfig;
128 |
129 | if (!parser || !style) {
130 | if (!parser && !notifyErrors) {
131 | atom.notifications.addWarning(
132 | `Parser '${sortConfig.config.parser}' not found`,
133 | );
134 | }
135 |
136 | if (!style && !notifyErrors) {
137 | atom.notifications.addWarning(
138 | `Style '${sortConfig.config.style}' not found`,
139 | );
140 | }
141 |
142 | return;
143 | }
144 |
145 | const cursor = editor.getCursorBufferPosition();
146 | const unsorted = editor.getText();
147 |
148 | let changes: ICodeChange[];
149 |
150 | allowUnsafeNewFunction(() => {
151 | allowUnsafeEval(() => {
152 | ({changes} = sortImports(
153 | unsorted,
154 | parser,
155 | style,
156 | path,
157 | rawConfig.options,
158 | ));
159 | });
160 | });
161 |
162 | (editor as TextEditor).transact(() => {
163 | for (const change of changes) {
164 | const start = editor.buffer.positionForCharacterIndex(change.start);
165 | const end = editor.buffer.positionForCharacterIndex(change.end);
166 |
167 | editor.setTextInBufferRange([start, end], change.code);
168 | }
169 | });
170 |
171 | editor.setCursorBufferPosition(cursor);
172 | } catch (e) {
173 | if (!notifyErrors) {
174 | atom.notifications.addWarning(
175 | `Failed to sort imports:\n${e.toString()}`,
176 | );
177 | }
178 | }
179 | }
180 |
181 | private sortCurrentEditor() {
182 | const editor = atom.workspace.getActiveTextEditor();
183 |
184 | if (editor) {
185 | this.sortEditor(editor);
186 | }
187 | }
188 | }
189 |
190 | module.exports = new Plugin();
191 |
--------------------------------------------------------------------------------
/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "moduleResolution": "node",
5 | "experimentalDecorators": true,
6 | "target": "es6",
7 | "module": "commonjs",
8 | "strictNullChecks": true,
9 | "declaration": true,
10 | "rootDir": ".",
11 | "outDir": "../lib"
12 | },
13 | "filesGlob": [
14 | "**/*.ts",
15 | "!../node_modules/**"
16 | ],
17 | "atom": {
18 | "rewriteTsconfig": true
19 | },
20 | "files": [
21 | "index.d.ts",
22 | "index.ts"
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/test/index.ts:
--------------------------------------------------------------------------------
1 | // import "mocha";
2 | // import {assert} from "chai";
3 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.settings.json",
3 |
4 | "compilerOptions": {
5 | "outDir": "lib",
6 | "rootDir": "src"
7 | },
8 |
9 | "include": ["src"],
10 |
11 | "references": [
12 | {"path": "../import-sort-parser"},
13 | {"path": "../import-sort-config"},
14 | {"path": "../import-sort-parser-babylon"},
15 | {"path": "../import-sort-parser-typescript"},
16 | {"path": "../import-sort-style-eslint"}
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tslint:latest",
3 | "rules": {
4 | "ordered-imports": false,
5 | "object-literal-sort-keys": false,
6 | "no-console": false,
7 | "no-unused-variable": [true, "react"]
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | "@types/atom@*", "@types/atom@^0.0.38":
6 | version "0.0.38"
7 | resolved "https://registry.yarnpkg.com/@types/atom/-/atom-0.0.38.tgz#eb85b14bc748efbf773064f082bbc6455dfa0b74"
8 | dependencies:
9 | "@types/emissary" "*"
10 | "@types/jquery" "*"
11 | "@types/pathwatcher" "*"
12 | "@types/q" "^0"
13 | "@types/space-pen" "*"
14 | "@types/status-bar" "*"
15 | "@types/text-buffer" "*"
16 |
17 | "@types/chai@^4.0.0":
18 | version "4.0.0"
19 | resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.0.0.tgz#4c9adabd2d04265769e6d9e847e86cc404dc7dcd"
20 |
21 | "@types/emissary@*":
22 | version "0.0.29"
23 | resolved "https://registry.yarnpkg.com/@types/emissary/-/emissary-0.0.29.tgz#f3abb72a4bae421e65e3f539e3c455d575f36b51"
24 | dependencies:
25 | "@types/mixto" "*"
26 |
27 | "@types/jquery@*":
28 | version "1.10.32"
29 | resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-1.10.32.tgz#a367d5ba2f4d56c986079827413f5bfc52eb4dfc"
30 |
31 | "@types/mixto@*":
32 | version "0.0.28"
33 | resolved "https://registry.yarnpkg.com/@types/mixto/-/mixto-0.0.28.tgz#7a260932db07ca1eb933466debaec0266ec87b51"
34 |
35 | "@types/mocha@^2.2.41":
36 | version "2.2.41"
37 | resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.41.tgz#e27cf0817153eb9f2713b2d3f6c68f1e1c3ca608"
38 |
39 | "@types/node@*", "@types/node@^7.0.31":
40 | version "7.0.31"
41 | resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.31.tgz#80ea4d175599b2a00149c29a10a4eb2dff592e86"
42 |
43 | "@types/pathwatcher@*":
44 | version "0.0.32"
45 | resolved "https://registry.yarnpkg.com/@types/pathwatcher/-/pathwatcher-0.0.32.tgz#edab26f9d45a7f2bc5885ab86d9aa1d46f86e004"
46 | dependencies:
47 | "@types/node" "*"
48 | "@types/q" "^0"
49 |
50 | "@types/q@^0":
51 | version "0.0.35"
52 | resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.35.tgz#1893674fb15f138013ec108d233f68fc7df0f155"
53 |
54 | "@types/space-pen@*":
55 | version "0.0.28"
56 | resolved "https://registry.yarnpkg.com/@types/space-pen/-/space-pen-0.0.28.tgz#9f5100e817fa81fa8abfa36af8bcd27f6fd7dc57"
57 | dependencies:
58 | "@types/jquery" "*"
59 |
60 | "@types/status-bar@*":
61 | version "0.0.29"
62 | resolved "https://registry.yarnpkg.com/@types/status-bar/-/status-bar-0.0.29.tgz#2caceb03adf44dc74ec868206f74113911ee14c5"
63 | dependencies:
64 | "@types/space-pen" "*"
65 | "@types/text-buffer" "*"
66 |
67 | "@types/text-buffer@*":
68 | version "0.0.31"
69 | resolved "https://registry.yarnpkg.com/@types/text-buffer/-/text-buffer-0.0.31.tgz#d94edc1395e4073b5bc44099429add9eb2a40355"
70 | dependencies:
71 | "@types/atom" "*"
72 | "@types/emissary" "*"
73 |
74 | ansi-regex@^2.0.0:
75 | version "2.1.1"
76 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
77 |
78 | ansi-styles@^2.2.1:
79 | version "2.2.1"
80 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
81 |
82 | arrify@^1.0.0:
83 | version "1.0.1"
84 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
85 |
86 | assertion-error@^1.0.1:
87 | version "1.0.2"
88 | resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
89 |
90 | babel-code-frame@^6.22.0:
91 | version "6.22.0"
92 | resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4"
93 | dependencies:
94 | chalk "^1.1.0"
95 | esutils "^2.0.2"
96 | js-tokens "^3.0.0"
97 |
98 | balanced-match@^1.0.0:
99 | version "1.0.0"
100 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
101 |
102 | brace-expansion@^1.1.7:
103 | version "1.1.8"
104 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
105 | dependencies:
106 | balanced-match "^1.0.0"
107 | concat-map "0.0.1"
108 |
109 | browser-stdout@1.3.0:
110 | version "1.3.0"
111 | resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f"
112 |
113 | chai@^4.0.2:
114 | version "4.0.2"
115 | resolved "https://registry.yarnpkg.com/chai/-/chai-4.0.2.tgz#2f7327c4de6f385dd7787999e2ab02697a32b83b"
116 | dependencies:
117 | assertion-error "^1.0.1"
118 | check-error "^1.0.1"
119 | deep-eql "^2.0.1"
120 | get-func-name "^2.0.0"
121 | pathval "^1.0.0"
122 | type-detect "^4.0.0"
123 |
124 | chalk@^1.1.0, chalk@^1.1.1:
125 | version "1.1.3"
126 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
127 | dependencies:
128 | ansi-styles "^2.2.1"
129 | escape-string-regexp "^1.0.2"
130 | has-ansi "^2.0.0"
131 | strip-ansi "^3.0.0"
132 | supports-color "^2.0.0"
133 |
134 | check-error@^1.0.1:
135 | version "1.0.2"
136 | resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
137 |
138 | colors@^1.1.2:
139 | version "1.1.2"
140 | resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"
141 |
142 | commander@2.9.0, commander@^2.9.0:
143 | version "2.9.0"
144 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
145 | dependencies:
146 | graceful-readlink ">= 1.0.0"
147 |
148 | concat-map@0.0.1:
149 | version "0.0.1"
150 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
151 |
152 | debug@2.6.0:
153 | version "2.6.0"
154 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b"
155 | dependencies:
156 | ms "0.7.2"
157 |
158 | deep-eql@^2.0.1:
159 | version "2.0.2"
160 | resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-2.0.2.tgz#b1bac06e56f0a76777686d50c9feb75c2ed7679a"
161 | dependencies:
162 | type-detect "^3.0.0"
163 |
164 | diff@3.2.0, diff@^3.1.0, diff@^3.2.0:
165 | version "3.2.0"
166 | resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9"
167 |
168 | escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2:
169 | version "1.0.5"
170 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
171 |
172 | esutils@^2.0.2:
173 | version "2.0.2"
174 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
175 |
176 | fs.realpath@^1.0.0:
177 | version "1.0.0"
178 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
179 |
180 | get-func-name@^2.0.0:
181 | version "2.0.0"
182 | resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"
183 |
184 | glob@7.1.1, glob@^7.1.1:
185 | version "7.1.1"
186 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
187 | dependencies:
188 | fs.realpath "^1.0.0"
189 | inflight "^1.0.4"
190 | inherits "2"
191 | minimatch "^3.0.2"
192 | once "^1.3.0"
193 | path-is-absolute "^1.0.0"
194 |
195 | "graceful-readlink@>= 1.0.0":
196 | version "1.0.1"
197 | resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
198 |
199 | growl@1.9.2:
200 | version "1.9.2"
201 | resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f"
202 |
203 | has-ansi@^2.0.0:
204 | version "2.0.0"
205 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
206 | dependencies:
207 | ansi-regex "^2.0.0"
208 |
209 | has-flag@^1.0.0:
210 | version "1.0.0"
211 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
212 |
213 | inflight@^1.0.4:
214 | version "1.0.6"
215 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
216 | dependencies:
217 | once "^1.3.0"
218 | wrappy "1"
219 |
220 | inherits@2:
221 | version "2.0.3"
222 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
223 |
224 | js-tokens@^3.0.0:
225 | version "3.0.1"
226 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7"
227 |
228 | json3@3.3.2:
229 | version "3.3.2"
230 | resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1"
231 |
232 | lodash._baseassign@^3.0.0:
233 | version "3.2.0"
234 | resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e"
235 | dependencies:
236 | lodash._basecopy "^3.0.0"
237 | lodash.keys "^3.0.0"
238 |
239 | lodash._basecopy@^3.0.0:
240 | version "3.0.1"
241 | resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
242 |
243 | lodash._basecreate@^3.0.0:
244 | version "3.0.3"
245 | resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821"
246 |
247 | lodash._getnative@^3.0.0:
248 | version "3.9.1"
249 | resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
250 |
251 | lodash._isiterateecall@^3.0.0:
252 | version "3.0.9"
253 | resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c"
254 |
255 | lodash.create@3.1.1:
256 | version "3.1.1"
257 | resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7"
258 | dependencies:
259 | lodash._baseassign "^3.0.0"
260 | lodash._basecreate "^3.0.0"
261 | lodash._isiterateecall "^3.0.0"
262 |
263 | lodash.isarguments@^3.0.0:
264 | version "3.1.0"
265 | resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
266 |
267 | lodash.isarray@^3.0.0:
268 | version "3.0.4"
269 | resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
270 |
271 | lodash.keys@^3.0.0:
272 | version "3.1.2"
273 | resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
274 | dependencies:
275 | lodash._getnative "^3.0.0"
276 | lodash.isarguments "^3.0.0"
277 | lodash.isarray "^3.0.0"
278 |
279 | loophole@^1.1.0:
280 | version "1.1.0"
281 | resolved "https://registry.yarnpkg.com/loophole/-/loophole-1.1.0.tgz#37949fea453b6256acc725c320ce0c5a7f70a2bd"
282 |
283 | make-error@^1.1.1:
284 | version "1.3.0"
285 | resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.0.tgz#52ad3a339ccf10ce62b4040b708fe707244b8b96"
286 |
287 | minimatch@^3.0.2, minimatch@^3.0.4:
288 | version "3.0.4"
289 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
290 | dependencies:
291 | brace-expansion "^1.1.7"
292 |
293 | minimist@0.0.8:
294 | version "0.0.8"
295 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
296 |
297 | minimist@^1.2.0:
298 | version "1.2.0"
299 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
300 |
301 | mkdirp@0.5.1, mkdirp@^0.5.1:
302 | version "0.5.1"
303 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
304 | dependencies:
305 | minimist "0.0.8"
306 |
307 | mocha@^3.4.2:
308 | version "3.4.2"
309 | resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.4.2.tgz#d0ef4d332126dbf18d0d640c9b382dd48be97594"
310 | dependencies:
311 | browser-stdout "1.3.0"
312 | commander "2.9.0"
313 | debug "2.6.0"
314 | diff "3.2.0"
315 | escape-string-regexp "1.0.5"
316 | glob "7.1.1"
317 | growl "1.9.2"
318 | json3 "3.3.2"
319 | lodash.create "3.1.1"
320 | mkdirp "0.5.1"
321 | supports-color "3.1.2"
322 |
323 | ms@0.7.2:
324 | version "0.7.2"
325 | resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765"
326 |
327 | once@^1.3.0:
328 | version "1.4.0"
329 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
330 | dependencies:
331 | wrappy "1"
332 |
333 | path-is-absolute@^1.0.0:
334 | version "1.0.1"
335 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
336 |
337 | path-parse@^1.0.5:
338 | version "1.0.5"
339 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
340 |
341 | pathval@^1.0.0:
342 | version "1.1.0"
343 | resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0"
344 |
345 | resolve@^1.3.2:
346 | version "1.3.3"
347 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5"
348 | dependencies:
349 | path-parse "^1.0.5"
350 |
351 | semver@^5.3.0:
352 | version "5.3.0"
353 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
354 |
355 | source-map-support@^0.4.0:
356 | version "0.4.15"
357 | resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1"
358 | dependencies:
359 | source-map "^0.5.6"
360 |
361 | source-map@^0.5.6:
362 | version "0.5.6"
363 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"
364 |
365 | strip-ansi@^3.0.0:
366 | version "3.0.1"
367 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
368 | dependencies:
369 | ansi-regex "^2.0.0"
370 |
371 | strip-bom@^3.0.0:
372 | version "3.0.0"
373 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
374 |
375 | strip-json-comments@^2.0.0:
376 | version "2.0.1"
377 | resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
378 |
379 | supports-color@3.1.2:
380 | version "3.1.2"
381 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5"
382 | dependencies:
383 | has-flag "^1.0.0"
384 |
385 | supports-color@^2.0.0:
386 | version "2.0.0"
387 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
388 |
389 | ts-node@^3.0.6:
390 | version "3.0.6"
391 | resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-3.0.6.tgz#55127ff790c7eebf6ba68c1e6dde94b09aaa21e0"
392 | dependencies:
393 | arrify "^1.0.0"
394 | chalk "^1.1.1"
395 | diff "^3.1.0"
396 | make-error "^1.1.1"
397 | minimist "^1.2.0"
398 | mkdirp "^0.5.1"
399 | source-map-support "^0.4.0"
400 | tsconfig "^6.0.0"
401 | v8flags "^2.0.11"
402 | yn "^2.0.0"
403 |
404 | tsconfig@^6.0.0:
405 | version "6.0.0"
406 | resolved "https://registry.yarnpkg.com/tsconfig/-/tsconfig-6.0.0.tgz#6b0e8376003d7af1864f8df8f89dd0059ffcd032"
407 | dependencies:
408 | strip-bom "^3.0.0"
409 | strip-json-comments "^2.0.0"
410 |
411 | tslib@^1.7.1:
412 | version "1.7.1"
413 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.7.1.tgz#bc8004164691923a79fe8378bbeb3da2017538ec"
414 |
415 | tslint@^5.4.3:
416 | version "5.4.3"
417 | resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.4.3.tgz#761c8402b80e347b7733a04390a757b253580467"
418 | dependencies:
419 | babel-code-frame "^6.22.0"
420 | colors "^1.1.2"
421 | commander "^2.9.0"
422 | diff "^3.2.0"
423 | glob "^7.1.1"
424 | minimatch "^3.0.4"
425 | resolve "^1.3.2"
426 | semver "^5.3.0"
427 | tslib "^1.7.1"
428 | tsutils "^2.3.0"
429 |
430 | tsutils@^2.3.0:
431 | version "2.4.0"
432 | resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.4.0.tgz#ad4ce6dba0e5a3edbddf8626b7ca040782189fea"
433 |
434 | type-detect@^3.0.0:
435 | version "3.0.0"
436 | resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-3.0.0.tgz#46d0cc8553abb7b13a352b0d6dea2fd58f2d9b55"
437 |
438 | type-detect@^4.0.0:
439 | version "4.0.3"
440 | resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.3.tgz#0e3f2670b44099b0b46c284d136a7ef49c74c2ea"
441 |
442 | typescript@^2.3.4:
443 | version "2.4.0"
444 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.0.tgz#aef5a8d404beba36ad339abf079ddddfffba86dd"
445 |
446 | user-home@^1.1.1:
447 | version "1.1.1"
448 | resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"
449 |
450 | v8flags@^2.0.11:
451 | version "2.1.1"
452 | resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4"
453 | dependencies:
454 | user-home "^1.1.1"
455 |
456 | wrappy@1:
457 | version "1.0.2"
458 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
459 |
460 | yn@^2.0.0:
461 | version "2.0.0"
462 | resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a"
463 |
--------------------------------------------------------------------------------