Skip to content
This repository was archived by the owner on Dec 4, 2022. It is now read-only.

Commit 0c28bfa

Browse files
committed
change the ts-ignore message to have the string "AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX"
1 parent f11276d commit 0c28bfa

File tree

11 files changed

+64
-64
lines changed

11 files changed

+64
-64
lines changed

src/cli/command-registrar.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function logAndExit(str) {
3535
function start() {
3636
program.version(pkg.version).description('bit driver for javascript');
3737
commands.forEach(c => {
38-
// @ts-ignore FIXME
38+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
3939
const currentCommand = program.command(c.name).description(c.description);
4040

4141
if (c.options && Array.isArray(c.options)) {
@@ -49,7 +49,7 @@ function start() {
4949
c.action(args, options)
5050
.then(c.report)
5151
.then(logAndExit)
52-
// @ts-ignore FIXME
52+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
5353
.catch(c.handleError || errorHandler);
5454
});
5555
});

src/cli/loader/loader.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ const off = (): Loader | null | undefined => {
4646

4747
const loader: Loader = {
4848
on,
49-
// @ts-ignore FIXME
49+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
5050
off,
51-
// @ts-ignore FIXME
51+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
5252
stop,
53-
// @ts-ignore FIXME
53+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
5454
start,
55-
// @ts-ignore FIXME
55+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
5656
setText,
57-
// @ts-ignore FIXME
57+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
5858
get
5959
};
6060

src/dependency-builder/build-tree.spec.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@ describe('buildTree', () => {
2121
expect(results).to.deep.equal({ tree: {} });
2222
});
2323
it('when unsupported files are passed should return them with no dependencies', async () => {
24-
// @ts-ignore FIXME
24+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
2525
dependencyTreeParams.filePaths = [`${fixtures}/unsupported-file.pdf`];
2626
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
2727
const results = await buildTree.getDependencyTree(dependencyTreeParams);
2828
expect(results.tree).to.deep.equal({ 'fixtures/unsupported-file.pdf': {} });
2929
});
3030
it('when supported and unsupported files are passed should return them all', async () => {
31-
// @ts-ignore FIXME
32-
// @ts-ignore FIXME
31+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
32+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
3333
dependencyTreeParams.filePaths = [`${fixtures}/unsupported-file.pdf`, `${precinctFixtures}/es6.js`];
3434
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
3535
const results = await buildTree.getDependencyTree(dependencyTreeParams);
3636
expect(results.tree).to.have.property('fixtures/unsupported-file.pdf');
3737
expect(results.tree).to.have.property('fixtures/precinct/es6.js');
3838
});
3939
it('when a js file has parsing error it should add the file to the tree with the error instance', async () => {
40-
// @ts-ignore FIXME
40+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
4141
dependencyTreeParams.filePaths = [`${precinctFixtures}/unparseable.js`];
4242
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
4343
const results = await buildTree.getDependencyTree(dependencyTreeParams);
@@ -47,7 +47,7 @@ describe('buildTree', () => {
4747
expect(results.tree[unParsedFile].error).to.be.instanceof(Error);
4848
});
4949
it('when a js file has parsing error and it retrieved from the cache it should add the file to the tree with the error instance', async () => {
50-
// @ts-ignore FIXME
50+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
5151
dependencyTreeParams.filePaths = [`${precinctFixtures}/unparseable.js`];
5252
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
5353
dependencyTreeParams.visited = {};
@@ -66,7 +66,7 @@ describe('buildTree', () => {
6666
expect(resultsCached.tree[unParsedFile].error).to.be.instanceof(Error);
6767
});
6868
it.skip('when a css file has parsing error it should add the file to the tree with the error instance', async () => {
69-
// @ts-ignore FIXME
69+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
7070
dependencyTreeParams.filePaths = [`${buildTreeFixtures}/unparsed.css`];
7171
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
7272
const results = await buildTree.getDependencyTree(dependencyTreeParams);
@@ -78,8 +78,8 @@ describe('buildTree', () => {
7878
describe('when a dependency of dependency has parsing error', () => {
7979
let results;
8080
before(async () => {
81-
// @ts-ignore FIXME
82-
// @ts-ignore FIXME
81+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
82+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
8383
dependencyTreeParams.filePaths = [`${buildTreeFixtures}/a.js`, `${buildTreeFixtures}/b.js`];
8484
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
8585
results = await buildTree.getDependencyTree(dependencyTreeParams);
@@ -102,7 +102,7 @@ describe('buildTree', () => {
102102
let results;
103103
const missingDepsFile = 'fixtures/missing-deps.js';
104104
before(async () => {
105-
// @ts-ignore FIXME
105+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
106106
dependencyTreeParams.filePaths = [`${fixtures}/missing-deps.js`];
107107
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
108108
results = await buildTree.getDependencyTree(dependencyTreeParams);
@@ -122,7 +122,7 @@ describe('buildTree', () => {
122122
describe('when a file imports from itself', () => {
123123
let results;
124124
before(async () => {
125-
// @ts-ignore FIXME
125+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
126126
dependencyTreeParams.filePaths = [`${buildTreeFixtures}/tree-shaking-cycle/self-cycle.js`];
127127
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
128128
results = await buildTree.getDependencyTree(dependencyTreeParams);
@@ -135,7 +135,7 @@ describe('buildTree', () => {
135135
describe('cycle with multiple files', () => {
136136
let results;
137137
before(async () => {
138-
// @ts-ignore FIXME
138+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
139139
dependencyTreeParams.filePaths = [`${buildTreeFixtures}/tree-shaking-cycle/foo.js`];
140140
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
141141
results = await buildTree.getDependencyTree(dependencyTreeParams);
@@ -155,7 +155,7 @@ describe('buildTree', () => {
155155
describe('fileA imports varX from fileB, fileB imports varX from fileC but not export it', () => {
156156
let results;
157157
before(async () => {
158-
// @ts-ignore FIXME
158+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
159159
dependencyTreeParams.filePaths = [`${buildTreeFixtures}/not-link-file/file-a.js`];
160160
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
161161
results = await buildTree.getDependencyTree(dependencyTreeParams);

src/dependency-builder/build-tree.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ export function resolveNodePackage(cwd: string, packageFullPath: string): Record
8282
// if you have 2 authored component which one dependet on the other
8383
// we will look for the package.json on the dependency but won't find it
8484
// if we propagate we will take the version from the root's package json which has nothing with the component version
85-
// @ts-ignore FIXME
85+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
8686
const packageInfo = PackageJson.loadSync(packageDir, false);
8787

8888
// when running 'bitjs get-dependencies' command, packageInfo is sometimes empty
8989
// or when using custom-module-resolution it may be empty or the name/version are empty
90-
// @ts-ignore FIXME
90+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
9191
if (!packageInfo || !packageInfo.name || !packageInfo.version) return null;
9292
result[packageInfo.name] = packageInfo.version;
9393
return result;
@@ -131,7 +131,7 @@ function groupDependencyList(list, cwd, bindingPrefix) {
131131
groups.packages.forEach(packagePath => {
132132
const packageWithVersion = resolveNodePackage(cwd, path.join(cwd, packagePath));
133133
if (packageWithVersion) Object.assign(packages, packageWithVersion);
134-
// @ts-ignore FIXME
134+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
135135
else unidentifiedPackages.push(packagePath);
136136
});
137137
groups.packages = packages;
@@ -262,7 +262,7 @@ function groupMissing(missing, cwd, consumerPath, bindingPrefix) {
262262
if (R.contains(packageName, missingPackages)) return;
263263
const resolvedPath = resolveModulePath(packageName, cwd, consumerPath);
264264
if (!resolvedPath) {
265-
// @ts-ignore FIXME
265+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
266266
missingPackages.push(packageName);
267267
return;
268268
}
@@ -417,7 +417,7 @@ export async function getDependencyTree({
417417
resolveConfig: resolveConfigAbsolute,
418418
cacheProjectAst
419419
};
420-
// @ts-ignore FIXME
420+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
421421
const { madgeTree, skipped, pathMap, errors } = generateTree(filePaths, config);
422422
const tree: Tree = groupDependencyTree(madgeTree, baseDir, bindingPrefix);
423423
const { missingGroups, foundPackages } = groupMissing(skipped, baseDir, consumerPath, bindingPrefix);

src/dependency-builder/dependency-tree/Config.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,58 +9,58 @@ const debug = require('debug')('tree');
99

1010
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
1111
function Config(options) {
12-
// @ts-ignore FIXME
12+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
1313
this.filename = options.filename;
14-
// @ts-ignore FIXME
14+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
1515
this.directory = options.directory || options.root;
16-
// @ts-ignore FIXME
16+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
1717
this.visited = options.visited || {};
18-
// @ts-ignore FIXME
18+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
1919
this.errors = options.errors || {};
20-
// @ts-ignore FIXME
20+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
2121
this.nonExistent = options.nonExistent || [];
22-
// @ts-ignore FIXME
22+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
2323
this.isListForm = options.isListForm;
24-
// @ts-ignore FIXME
24+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
2525
this.requireConfig = options.config || options.requireConfig;
26-
// @ts-ignore FIXME
26+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
2727
this.webpackConfig = options.webpackConfig;
28-
// @ts-ignore FIXME
28+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
2929
this.detectiveConfig = options.detective || options.detectiveConfig || {};
30-
// @ts-ignore FIXME
30+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
3131
this.pathMap = options.pathMap || [];
32-
// @ts-ignore FIXME
32+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
3333
this.resolveConfig = options.resolveConfig;
34-
// @ts-ignore FIXME
34+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
3535
this.cacheProjectAst = options.cacheProjectAst;
3636

37-
// @ts-ignore FIXME
37+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
3838
this.filter = options.filter;
3939

40-
// @ts-ignore FIXME
40+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
4141
if (!this.filename) {
4242
throw new Error('filename not given');
4343
}
44-
// @ts-ignore FIXME
44+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
4545
if (!this.directory) {
4646
throw new Error('directory not given');
4747
}
48-
// @ts-ignore FIXME
49-
// @ts-ignore FIXME
48+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
49+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
5050
if (this.filter && typeof this.filter !== 'function') {
5151
throw new Error('filter must be a function');
5252
}
5353

54-
// @ts-ignore FIXME
54+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
5555
debug(`given filename: ${this.filename}`);
5656

57-
// @ts-ignore FIXME
58-
// @ts-ignore FIXME
57+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
58+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
5959
this.filename = path.resolve(process.cwd(), this.filename);
6060

61-
// @ts-ignore FIXME
61+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
6262
debug(`resolved filename: ${this.filename}`);
63-
// @ts-ignore FIXME
63+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
6464
debug('visited: ', this.visited);
6565
}
6666

src/dependency-builder/dependency-tree/index.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -963,11 +963,11 @@ describe('dependencyTree', function() {
963963
resolveConfig: { aliases: { something: 'anything' } }
964964
};
965965
dependencyTree(config);
966-
// @ts-ignore FIXME
966+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
967967
const pathMapRecord = config.pathMap.find(f => f.file === filename);
968-
// @ts-ignore FIXME
968+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
969969
expect(pathMapRecord.dependencies).to.have.lengthOf(1);
970-
// @ts-ignore FIXME
970+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
971971
const dependency = pathMapRecord.dependencies[0];
972972
expect(dependency).to.not.have.property('isCustomResolveUsed');
973973
});
@@ -991,11 +991,11 @@ describe('dependencyTree', function() {
991991
resolveConfig: { aliases: { something: 'anything' } }
992992
};
993993
dependencyTree(config);
994-
// @ts-ignore FIXME
994+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
995995
const pathMapRecord = config.pathMap.find(f => f.file === filename);
996-
// @ts-ignore FIXME
996+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
997997
expect(pathMapRecord.dependencies).to.have.lengthOf(1);
998-
// @ts-ignore FIXME
998+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
999999
const dependency = pathMapRecord.dependencies[0];
10001000
expect(dependency).to.not.have.property('isCustomResolveUsed');
10011001
});

src/dependency-builder/dependency-tree/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ module.exports._getDependencies = function(config) {
147147
pathMap.isCustomResolveUsed = true;
148148
}
149149

150-
// @ts-ignore FIXME
150+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
151151
pathMapDependencies.push(pathMap);
152152

153-
// @ts-ignore FIXME
153+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
154154
resolvedDependencies.push(result);
155155
}
156156
function addToNonExistent(dependency) {
@@ -197,7 +197,7 @@ function traverse(config) {
197197
debug(`number of dependencies after filtering: ${dependencies.length}`);
198198
}
199199
debug('cabinet-resolved all dependencies: ', dependencies);
200-
// @ts-ignore FIXME
200+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
201201
tree[dependency] = dependencies;
202202
const filePathMap = config.pathMap.find(pathMapEntry => pathMapEntry.file === dependency);
203203
if (!filePathMap) throw new Error(`file ${dependency} is missing from PathMap`);
@@ -225,7 +225,7 @@ function traverse(config) {
225225
}
226226
debug(`found ${dependency} in the cache`);
227227
const dependencies = config.visited[dependency].pathMap.dependencies.map(d => d.resolvedDep);
228-
// @ts-ignore FIXME
228+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
229229
tree[dependency] = dependencies;
230230
config.pathMap.push(config.visited[dependency].pathMap);
231231
if (config.visited[dependency].missing) {

src/dependency-builder/detectives/detective-css-and-preprocessors/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = function detective(fileContent, syntax) {
2424

2525
const ast = csstree.parse(fileContent, {
2626
onParseError(error) {
27-
// @ts-ignore FIXME
27+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
2828
handleError(error);
2929
}
3030
});

src/dependency-builder/filing-cabinet/index.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ describe('filing-cabinet', () => {
211211
});
212212

213213
assert.ok(
214-
// @ts-ignore FIXME
214+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
215215
require.main.paths.some(function(p) {
216216
return p.indexOf(path.normalize(directory)) !== -1;
217217
})

src/dependency-builder/generate-tree-madge.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export default function generateTree(files = [], config) {
147147
});
148148
Object.assign(depTree, dependencyTreeResult);
149149
} catch (err) {
150-
// @ts-ignore FIXME
150+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
151151
errors[file] = err;
152152
}
153153
});

src/dependency-builder/path-map.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,16 @@ function getDependenciesFromLinkFileIfExists(
145145
return null;
146146
}
147147
const linkFiles = [];
148-
// @ts-ignore FIXME
148+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
149149
dependencies.forEach((dep: { file: string; importSpecifier: ImportSpecifier }) => {
150-
// @ts-ignore FIXME
150+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
151151
const existingFile = linkFiles.find(linkFile => linkFile.file === dep.file);
152152
if (existingFile) {
153-
// @ts-ignore FIXME
153+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
154154
existingFile.importSpecifiers.push(dep.importSpecifier);
155155
} else {
156-
// @ts-ignore FIXME
157-
// @ts-ignore FIXME
156+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
157+
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
158158
linkFiles.push({ file: dep.file, importSpecifiers: [dep.importSpecifier] });
159159
}
160160
});

0 commit comments

Comments
 (0)