11import { LEGACY_UPDATE_CUTOFF_VERSION } from '../constants.js' ;
22import { Codemod } from '../codemods/types.js' ;
3+ import { resolveScriptPath } from '../utils/utils.codemod.js' ;
34
45export interface Migration extends Codemod {
56 version : string ;
@@ -10,26 +11,26 @@ export default [
1011 name : '001-update-grafana-compose-extend' ,
1112 version : LEGACY_UPDATE_CUTOFF_VERSION ,
1213 description : 'Update ./docker-compose.yaml to extend from ./.config/docker-compose-base.yaml.' ,
13- scriptPath : './scripts/001-update-grafana-compose-extend.js' ,
14+ scriptPath : resolveScriptPath ( import . meta . url , './scripts/001-update-grafana-compose-extend.js' ) ,
1415 } ,
1516 {
1617 name : '002-update-is-compatible-workflow' ,
1718 version : LEGACY_UPDATE_CUTOFF_VERSION ,
1819 description :
1920 'Update ./.github/workflows/is-compatible.yml to use is-compatible github action instead of calling levitate directly' ,
20- scriptPath : './scripts/002-update-is-compatible-workflow.js' ,
21+ scriptPath : resolveScriptPath ( import . meta . url , './scripts/002-update-is-compatible-workflow.js' ) ,
2122 } ,
2223 {
2324 name : '003-update-eslint-deprecation-rule' ,
2425 version : LEGACY_UPDATE_CUTOFF_VERSION ,
2526 description : 'Replace deprecated eslint-plugin-deprecation with @typescript-eslint/no-deprecated rule.' ,
26- scriptPath : './scripts/003-update-eslint-deprecation-rule.js' ,
27+ scriptPath : resolveScriptPath ( import . meta . url , './scripts/003-update-eslint-deprecation-rule.js' ) ,
2728 } ,
2829 {
2930 name : '004-eslint9-flat-config' ,
3031 version : LEGACY_UPDATE_CUTOFF_VERSION ,
3132 description : 'Migrate eslint config to flat config format and update devDependencies to latest versions.' ,
32- scriptPath : './scripts/004-eslint9-flat-config.js' ,
33+ scriptPath : resolveScriptPath ( import . meta . url , './scripts/004-eslint9-flat-config.js' ) ,
3334 } ,
3435 // Do not use LEGACY_UPDATE_CUTOFF_VERSION for new migrations. It is only used above to force migrations to run
3536 // for those written before the switch to updates as migrations.
0 commit comments