@hubspot/project-parsing-lib 0.14.1 → 0.15.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.14.1",
3
+ "version": "0.15.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",
@@ -1,4 +1,4 @@
1
1
  export { getProjectMetadata } from '../lib/project.js';
2
2
  export { projectContainsHsMetaFiles } from '../lib/files.js';
3
3
  export type { ProjectMetadata } from '../lib/project.js';
4
- export { LATEST_SUPPORTED_PLATFORM_VERSION, isSupportedPlatformVersion, isUnifiedProject, } from '../lib/platformVersion.js';
4
+ export { LATEST_SUPPORTED_PLATFORM_VERSION, isSupportedPlatformVersion, isLegacyProject, } from '../lib/platformVersion.js';
@@ -1,3 +1,3 @@
1
1
  export { getProjectMetadata } from '../lib/project.js';
2
2
  export { projectContainsHsMetaFiles } from '../lib/files.js';
3
- export { LATEST_SUPPORTED_PLATFORM_VERSION, isSupportedPlatformVersion, isUnifiedProject, } from '../lib/platformVersion.js';
3
+ export { LATEST_SUPPORTED_PLATFORM_VERSION, isSupportedPlatformVersion, isLegacyProject, } from '../lib/platformVersion.js';
@@ -1,3 +1,3 @@
1
1
  export declare const LATEST_SUPPORTED_PLATFORM_VERSION: string;
2
2
  export declare function isSupportedPlatformVersion(platformVersion?: string | null): boolean;
3
- export declare function isUnifiedProject(platformVersion?: string | null): boolean;
3
+ export declare function isLegacyProject(platformVersion?: string | null): boolean;
@@ -9,12 +9,8 @@ export function isSupportedPlatformVersion(platformVersion) {
9
9
  const supportedPlatformVersions = Object.values(PLATFORM_VERSIONS);
10
10
  return supportedPlatformVersions.includes(platformVersion);
11
11
  }
12
- export function isUnifiedProject(platformVersion) {
13
- if (!isSupportedPlatformVersion(platformVersion)) {
12
+ export function isLegacyProject(platformVersion) {
13
+ if (!platformVersion)
14
14
  return false;
15
- }
16
- const [year, minor] = platformVersion.split(/[.-]/);
17
- const yearNum = Number(year);
18
- const minorNum = Number(minor);
19
- return (yearNum === 2025 && minorNum >= 2) || yearNum > 2025;
15
+ return [PLATFORM_VERSIONS.v2023_2, PLATFORM_VERSIONS.v2025_1].includes(platformVersion);
20
16
  }