jdalrymple / gitbeaker

🦊🧪 A comprehensive and typed Gitlab SDK for Node.js, Browsers, Deno and CLI
Other
1.57k stars 299 forks source link

Remove --treeshake option to work with node 22 #3613

Closed kashz closed 3 months ago

kashz commented 4 months ago

To work with Node.js 22, the --treeshake option has been removed from the build command.

https://github.com/jdalrymple/gitbeaker/issues/3591#issuecomment-2228760381

Build Diff

Here are the build differences observed after making these changes:

--- packages/cli/dist/index.mjs
+++ packages/cli/dist/index.mjs
@@ -1,10 +1,13 @@
 #!/usr/bin/env node
-import Chalk from 'chalk';
-import Sywac from 'sywac';
-import * as Gitbeaker from '@gitbeaker/rest';
-import API_MAP from '@gitbeaker/core/map.json' assert { type: 'json' };
-import { decamelize, depascalize, camelize } from 'xcase';

+// src/cli.ts
+import Chalk from "chalk";
+import Sywac from "sywac";
+import * as Gitbeaker from "@gitbeaker/rest";
+import API_MAP from "@gitbeaker/core/map.json" with { type: "json" };
+
+// src/utils.ts
+import { camelize, decamelize, depascalize } from "xcase";
 function param(value) {
   let cleaned = value;
   const exceptions = [

refer to #3591

jdalrymple commented 3 months ago

:rocket: PR was released in 40.1.3 :rocket: