Disable moment deprecation warnings in production (#170827)

## Summary

Disable `momentjs` deprecation warnings in production environment to
avoid unexpected `console.log` entries.
This commit is contained in:
Pierre Gayvallet 2023-11-08 15:11:43 +01:00 committed by GitHub
parent a173300abc
commit c834113fb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -9,4 +9,5 @@
require('../setup_node_env/dist');
require('./apm')();
require('../setup_node_env/root');
require('../setup_node_env/mute_libraries');
require('./cli');

View file

@ -0,0 +1,11 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
// disable moment deprecation warnings
var moment = require('moment');
moment.suppressDeprecationWarnings = true;