You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1a0e1a4
Browse filesBrowse the repository at this point in the historyBrowse files
Explain how to preserve dependency metadata opt-outs when migrating to cf
6
+
7
+
Wrangler configurations with `dependencies_instrumentation.enabled` set to `false` now receive a migration follow-up directing them to `CLOUDFLARE_DEPENDENCIES_INSTRUMENTATION=false`. Package exclusion lists remain required follow-up work because the environment variable controls dependency metadata as a whole.
"The dependency instrumentation configuration is invalid and was not migrated.",
65
+
{ sourcePath }
66
+
);
67
+
}
68
+
69
+
consthasExcludedPackages=
70
+
(instrumentation.exclude_packages?.length??0)>0;
71
+
72
+
if(instrumentation.enabled===false){
73
+
returncreateFollowUp(
74
+
"dependencies-instrumentation-opt-out",
75
+
`Set ${DEPENDENCIES_INSTRUMENTATION_ENV_VAR}=false before deploying to keep package dependency metadata disabled.${hasExcludedPackages ? " The package exclusion list was not migrated; if dependency metadata is later enabled, those packages will be included." : ""}`,
76
+
{ sourcePath }
77
+
);
78
+
}
79
+
80
+
if(hasExcludedPackages){
81
+
returncreateFollowUp(
82
+
"dependencies-instrumentation-exclusions",
83
+
`Package dependency exclusions cannot be migrated. ${DEPENDENCIES_INSTRUMENTATION_ENV_VAR} only enables or disables dependency metadata as a whole.`,
84
+
{ sourcePath }
85
+
);
86
+
}
87
+
88
+
return;
89
+
}
90
+
31
91
exportfunctionconvertWorkerConfig(
32
92
source: UnknownRecord,
33
93
sourcePrefix: string,
@@ -268,10 +328,14 @@ export function convertWorkerConfig(
0 commit comments