diff --git a/core/index.ts b/core/index.ts index 33022f36a..fce26dd4d 100644 --- a/core/index.ts +++ b/core/index.ts @@ -17,7 +17,15 @@ const session = globalSession(); const supportedFeatures = [dataform.SupportedFeatures.ARRAY_BUFFER_IPC]; -// These exports constitute the public API of @dataform/core. +// Older versions of the CLI are not compatible with Core version ^3.0.0, and throw when this method +// is not available. Instead this more interpretable error message is thrown. +// Note: for future backwards compatability breaking changes, the exported "version" variable should +// be used instead. +function indexFileGenerator() { + throw new Error("@dataform/cli ^3.0.0 required."); +} + +// These exports constitute the public API of @dataform/core. // They must also be listed in packages/@dataform/core/index.ts. -// Changes to these will break @dataform/api, so take care! -export { compiler, main, session, supportedFeatures, version }; +// Changes to these will break @dataform/cli, so take care! +export { compiler, indexFileGenerator, main, session, supportedFeatures, version }; diff --git a/packages/@dataform/core/index.ts b/packages/@dataform/core/index.ts index 16f611da5..eb90aa7ec 100644 --- a/packages/@dataform/core/index.ts +++ b/packages/@dataform/core/index.ts @@ -1 +1 @@ -export { compiler, main, session, supportedFeatures, version } from "df/core"; +export { compiler, indexFileGenerator, main, session, supportedFeatures, version } from "df/core";