File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ const Cache = require ( "sync-disk-cache" ) ;
2+ const getRepoInfo = require ( "git-repo-info" ) ;
3+
4+ const gitInfo = getRepoInfo ( ) ;
5+ const cache = new Cache ( `native-class-codemod-${ gitInfo . sha } ` ) ;
6+
7+ module . exports = cache ;
Original file line number Diff line number Diff line change 11const puppeteer = require ( "puppeteer" ) ;
2- const getRepoInfo = require ( "git-repo-info" ) ;
3- const Cache = require ( "sync-disk-cache" ) ;
4-
5- const gitInfo = getRepoInfo ( ) ;
6- const cache = new Cache ( `native-class-codemod-${ gitInfo . sha } ` ) ;
2+ const cache = require ( "./cache" ) ;
73
84module . exports = async function gatherTelemetry ( url ) {
95 const browser = await puppeteer . launch ( ) ;
Original file line number Diff line number Diff line change 33const { runTransformTest } = require ( "codemod-cli" ) ;
44
55// bootstrap the mock telemetry data
6- const getRepoInfo = require ( "git-repo-info" ) ;
7- const Cache = require ( "sync-disk-cache" ) ;
86const walkSync = require ( "walk-sync" ) ;
97const mockTelemetryData = require ( "./__testfixtures__/-mock-telemetry.json" ) ;
108
11- const gitInfo = getRepoInfo ( ) ;
12- const cache = new Cache ( `native-class-codemod-${ gitInfo . sha } ` ) ;
9+ const cache = require ( "../../lib/cache" ) ;
1310
1411// This is nasty, cwd is screwed up here for some reason
1512let testFiles = walkSync ( "./transforms/ember-object/__testfixtures__" , {
Original file line number Diff line number Diff line change 11const fs = require ( "fs-extra" ) ;
22const path = require ( "path" ) ;
33const walkSync = require ( "walk-sync" ) ;
4- const getRepoInfo = require ( "git-repo-info" ) ;
5- const Cache = require ( "sync-disk-cache" ) ;
6-
7- const gitInfo = getRepoInfo ( ) ;
8- const cache = new Cache ( `native-class-codemod-${ gitInfo . sha } ` ) ;
4+ const cache = require ( "../../../lib/cache" ) ;
95
106const telemetry = cache . has ( "telemetry" )
117 ? JSON . parse ( cache . get ( "telemetry" ) . value )
You can’t perform that action at this time.
0 commit comments