Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env node
'use strict';

const gatherTelemetry = require('../lib/gather-telemetry');
const { gatherTelemetryForUrl } = require('ember-codemods-telemetry-helpers');

(async () => {
await gatherTelemetry(process.argv[2]);
await gatherTelemetryForUrl(process.argv[2]);

require('codemod-cli').runTransform(
__dirname,
Expand Down
2 changes: 1 addition & 1 deletion bin/temeletry.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
'use strict';

const gatherTelemetry = require('../lib/gather-telemetry');
const { gatherTelemetry } = require('ember-codemods-telemetry-helpers');

gatherTelemetry(process.argv[2]);
7 changes: 0 additions & 7 deletions lib/cache.js

This file was deleted.

248 changes: 0 additions & 248 deletions lib/gather-telemetry.js

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"update-docs": "codemod-cli update-docs"
},
"dependencies": {
"ember-codemods-telemetry-helpers": "^0.5.0",
"codemod-cli": "^2.0.0",
"fs-extra": "^8.0.1",
"git-repo-info": "^2.1.0",
Expand Down
5 changes: 2 additions & 3 deletions transforms/ember-object/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

const path = require('path');
const { runTransformTest } = require('codemod-cli');
const { setTelemetry } = require('ember-codemods-telemetry-helpers');

// bootstrap the mock telemetry data
const walkSync = require('walk-sync');
const mockTelemetryData = require('./__testfixtures__/-mock-telemetry.json');

const cache = require('../../lib/cache');

// This is nasty, cwd is screwed up here for some reason
let testFiles = walkSync('./transforms/ember-object/__testfixtures__', {
globs: ['**/*.input.js'],
Expand All @@ -22,7 +21,7 @@ for (let testFile of testFiles) {
mockTelemetry[path.resolve(__dirname, `./__testfixtures__/${moduleName}`)] = value;
}

cache.set('telemetry', JSON.stringify(mockTelemetry));
setTelemetry(mockTelemetry);

runTransformTest({
type: 'jscodeshift',
Expand Down
2 changes: 1 addition & 1 deletion transforms/helpers/parse-helper.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('path');
const camelCase = require('camelcase');
const { getTelemetryFor } = require('ember-codemods-telemetry-helpers');
const { capitalizeFirstLetter, get, startsWithUpperCaseLetter } = require('./util');
const { getTelemetryFor } = require('./util/get-telemetry-for');
const { hasValidProps, isFileOfType, isTestFile } = require('./validation-helper');
const { createClass, withComments } = require('./transform-helper');
const { createDecoratorImportDeclarations, getImportedDecoratedProps } = require('./import-helper');
Expand Down
Loading