@hubspot/local-dev-lib 5.8.1 → 5.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,6 @@ import { escapeRegExp } from '../escapeRegExp.js';
7
7
  import { isModuleFolderChild } from '../../utils/cms/modules.js';
8
8
  import { logger } from '../logger.js';
9
9
  import { i18n } from '../../utils/lang.js';
10
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
11
10
  const i18nKey = 'lib.cms.handleFieldsJs';
12
11
  export class FieldsJs {
13
12
  projectDir;
@@ -37,6 +36,11 @@ export class FieldsJs {
37
36
  convertFieldsJs(writeDir) {
38
37
  const filePath = this.filePath;
39
38
  const dirName = path.dirname(filePath);
39
+ // Keep this inside the function: at module scope, webpack inlines
40
+ // `import.meta.url` as a build-machine string literal, which crashes
41
+ // bundled consumers (e.g. the VS Code extension) on Windows with
42
+ // "File URL path must be absolute".
43
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
40
44
  return new Promise((resolve, reject) => {
41
45
  const fieldOptionsAsString = Array.isArray(this.fieldOptions)
42
46
  ? this.fieldOptions.join(',')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/local-dev-lib",
3
- "version": "5.8.1",
3
+ "version": "5.8.2",
4
4
  "type": "module",
5
5
  "description": "Provides library functionality for HubSpot local development tooling, including the HubSpot CLI",
6
6
  "files": [