@hubspot/project-parsing-lib 0.23.2 → 0.23.3-beta.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/project-parsing-lib",
3
- "version": "0.23.2",
3
+ "version": "0.23.3-beta.0",
4
4
  "description": "Parsing library for converting projects directory structures to their intermediate representation",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -34,7 +34,7 @@ export declare const errorMessages: {
34
34
  unsupportedType: (type: string) => string;
35
35
  errorWithField: (field: string, error: string | undefined) => string;
36
36
  invalidJson: string;
37
- permissionsNotSupported: (platformVersion: string) => string;
37
+ permissionsNotSupported: (platformVersion: string, minimumVersion: string) => string;
38
38
  unexpectedToplevelFields: (unexpectedFields: string) => string;
39
39
  wrongDirectoryForComponent: (directory: string, componentType: string, componentMetadata: ComponentMetadata, correctDir: string) => string;
40
40
  };
package/src/lang/copy.js CHANGED
@@ -35,7 +35,7 @@ export const errorMessages = {
35
35
  unsupportedType: (type) => `Unsupported type: ${mapToUserFacingType(type)}`,
36
36
  errorWithField: (field, error) => `${field}: ${error || 'Unknown error'}`,
37
37
  invalidJson: 'Invalid JSON',
38
- permissionsNotSupported: (platformVersion) => `The "permissions" field is not supported on platform version "${platformVersion}". Upgrade to "2027.03-beta" or later to use component-level permissions.`,
38
+ permissionsNotSupported: (platformVersion, minimumVersion) => `The "permissions" field is not supported on platform version "${platformVersion}". Upgrade to "${minimumVersion}" or later to use component-level permissions.`,
39
39
  unexpectedToplevelFields: (unexpectedFields) => `Unexpected top-level properties found: ${unexpectedFields}`,
40
40
  wrongDirectoryForComponent: (directory, componentType, componentMetadata, correctDir) => `The directory '${directory}' is incorrect for type '${componentType}'. ${componentMetadata.userFriendlyName} ${componentMetadata.userFriendlyTypePlural} should only be placed in the '${correctDir}' directory`,
41
41
  },
@@ -49,8 +49,8 @@ function validateIntermediateRepresentationNode(schema, transformation, irNode,
49
49
  shouldSkipValidation = true;
50
50
  }
51
51
  if (irNode.permissions &&
52
- !meetsMinimumPlatformVersion(translationContext.platformVersion, PLATFORM_VERSIONS.v2027_03_BETA)) {
53
- transformation.fileParseResult.errors.push(errorMessages.validation.permissionsNotSupported(translationContext.platformVersion));
52
+ !meetsMinimumPlatformVersion(translationContext.platformVersion, PLATFORM_VERSIONS.v2027_03)) {
53
+ transformation.fileParseResult.errors.push(errorMessages.validation.permissionsNotSupported(translationContext.platformVersion, PLATFORM_VERSIONS.v2027_03));
54
54
  }
55
55
  if (!schema[irNode.componentType]) {
56
56
  if (!irNode.componentType) {