applyNodeDefaults = (
	node,
	{ futureDefaults, outputModule, targetProperties }
) => {
	if (node === false) return;

	F(node, "global", () => {
		if (targetProperties && targetProperties.global) return false;
		// TODO webpack 6 should always default to false
		return futureDefaults ? "warn" : true;
	});

	const handlerForNames = () => {
		if (targetProperties && targetProperties.node)
			return outputModule ? "node-module" : "eval-only";
		// TODO webpack 6 should always default to false
		return futureDefaults ? "warn-mock" : "mock";
	};

	F(node, "__filename", handlerForNames);
	F(node, "__dirname", handlerForNames);
}
@param {WebpackNode} node options
@param {object} options options
@param {TargetProperties | false} options.targetProperties target properties
@param {boolean} options.futureDefaults is future defaults enabled
@param {boolean} options.outputModule is output type is module
@returns {void}