Everything you need to know about breaking changes and major version bumps.
This is a major rewrite of the whole project.
In short, we are now publishing each plugin individually.
We changed the name of the packages we publish.
No more generic @datadog/build-plugin
packages, but instead one package per bundler.
"devDependencies": {
- "@datadog/build-plugin": "1.0.4",
+ "@datadog/esbuild-plugin": "2.0.0",
+ "@datadog/webpack-plugin": "2.0.0",
}
We changed how you import and instantiate the plugin in your code.
-import { BuildPlugin } from '@datadog/build-plugin/dist/esbuild';
+import { datadogEsbuildPlugin } from '@datadog/esbuild-plugin';
import esbuild from 'esbuild';
esbuild
.build({
plugins: [
- new BuildPlugin({
+ datadogEsbuildPlugin({
// Your configuration here.
}),
],
})
// webpack.config.js
-import { BuildPlugin } from '@datadog/build-plugin/dist/webpack';
+import { datadogWebpackPlugin } from '@datadog/webpack-plugin';
const config = {
plugins: [
- new BuildPlugin({
+ datadogWebpackPlugin({
// Your configuration here.
}),
]
};
export default config;
We changed a bit how the configuration goes:
Now, each plugin has its own configuration object, and no more datadog
key.
And we moved the apiKey
to the auth
key.
{
+ auth: {
+ apiKey: '<my-api-key>',
+ },
+ telemetry: {
disabled: false,
output: './esbuild-profile-debug',
- datadog: {
- apiKey: '<my-api-key>',
prefix: 'my.prefix',
[...]
- },
+ },
}
We expose the default filters in each bundler's package.
-import { defaultFilters } from '@datadog/build-plugin/dist/hooks/datadog/helpers';
+import { helpers } from '@datadog/webpack-plugin';
+const defaultFilters = helpers.telemetry.filters;
We added a new configuration point to better control the logs.
Before that, the default was debug
, but with this new setting, the default is warn
.
To keep the same behavior as before:
{
auth: {
[...]
},
+ logLevel: 'debug',
telemetry: {
[...]
},
}