handoff-app 1.2.0 → 1.2.1-1

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/Changelog.md CHANGED
@@ -6,7 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to
7
7
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
 
9
- ## [1.2.0] - 2026-04-03
9
+ ## \[1.2.1] - 2026-04-08
10
+
11
+ This is a minor release that fixes a bug in the new config diff calculator.
12
+ Under some conditions, this would fail depending on your node configuration.
13
+
14
+ ## \[1.2.0] - 2026-04-03
10
15
 
11
16
  This release introduces support for patterns and significantly
12
17
  modernizes the configuration and declaration workflow. It expands Handoff from
@@ -23,7 +23,7 @@ exports.getAllStrategies = getAllStrategies;
23
23
  * Called after component rebuilds so derived artifacts stay up-to-date.
24
24
  */
25
25
  const runAllFinalizers = (handoff, context) => __awaiter(void 0, void 0, void 0, function* () {
26
- for (const strategy of strategies.values()) {
26
+ for (const strategy of Array.from(strategies.values())) {
27
27
  yield strategy.finalize(handoff, context);
28
28
  }
29
29
  });
@@ -16,7 +16,7 @@ exports.stableStringify = stableStringify;
16
16
  */
17
17
  const diffMapSnapshots = (oldSnapshot, newSnapshot) => {
18
18
  const affected = new Set();
19
- for (const [key, oldEntries] of oldSnapshot) {
19
+ for (const [key, oldEntries] of Array.from(oldSnapshot)) {
20
20
  const newEntries = newSnapshot.get(key);
21
21
  if (!newEntries) {
22
22
  affected.add(key);
@@ -26,14 +26,14 @@ const diffMapSnapshots = (oldSnapshot, newSnapshot) => {
26
26
  affected.add(key);
27
27
  continue;
28
28
  }
29
- for (const [subKey, oldValue] of oldEntries) {
29
+ for (const [subKey, oldValue] of Array.from(oldEntries)) {
30
30
  if (newEntries.get(subKey) !== oldValue) {
31
31
  affected.add(key);
32
32
  break;
33
33
  }
34
34
  }
35
35
  }
36
- for (const key of newSnapshot.keys()) {
36
+ for (const key of Array.from(newSnapshot.keys())) {
37
37
  if (!oldSnapshot.has(key)) {
38
38
  affected.add(key);
39
39
  }
package/dist/cli.js CHANGED
@@ -19,7 +19,7 @@ class HandoffCliError extends Error {
19
19
  * Show the help message
20
20
  */
21
21
  const showVersion = () => {
22
- return 'Handoff App - 1.2.0';
22
+ return 'Handoff App - 1.2.1';
23
23
  };
24
24
  /**
25
25
  * Define a CLI error
@@ -0,0 +1,90 @@
1
+ /** @type {import('handoff-app').Config} */
2
+ const path = require('path');
3
+ module.exports = {
4
+ // Set your Figma project ID here or in the environment variable HANDOFF_FIGMA_PROJECT_ID
5
+ figma_project_id: null,
6
+ // Set the output directory for the exported components
7
+ exportsOutputDirectory: 'exported',
8
+ // Set the output directory for the sites
9
+ sitesOutputDirectory: 'out',
10
+ // These settings control the behavior of the application
11
+ app: {
12
+ // Set the theme for the application
13
+ theme: 'default',
14
+ // Set the title for the application
15
+ title: 'Handoff Design System',
16
+ // Set the client for the application, used in the footer
17
+ client: 'Handoff Technologies',
18
+ // Set the Google Tag Manager ID to add GTM scripts
19
+ google_tag_manager: null,
20
+ // Set the attribution for the application
21
+ attribution: true, // Should we remove this?
22
+ // Set the type copy for the typeography page
23
+ type_copy: 'Almost before we knew it, we had left the ground.',
24
+ // Set the type sort for the typeography page
25
+ type_sort: [
26
+ 'Heading 1',
27
+ 'Heading 2',
28
+ 'Heading 3',
29
+ 'Heading 4',
30
+ 'Heading 5',
31
+ 'Heading 6',
32
+ 'Paragraph',
33
+ 'Subheading',
34
+ 'Blockquote',
35
+ 'Input Labels',
36
+ 'Link',
37
+ ],
38
+ // Set the color sort for the color page
39
+ color_sort: ['primary', 'secondary', 'extra', 'system'],
40
+ // Set the component sort for the component page
41
+ component_sort: ['primary', 'secondary', 'transparent'],
42
+ // Set the base path for the application
43
+ base_path: '',
44
+ // Set the breakpoints for the application
45
+ breakpoints: {
46
+ sm: { size: 576, name: 'Small' },
47
+ md: { size: 768, name: 'Medium' },
48
+ lg: { size: 992, name: 'Large' },
49
+ xl: { size: 1200, name: 'Extra Large' },
50
+ },
51
+ // Set the ports for the application
52
+ ports: { app: 3000, websocket: 3001 },
53
+ },
54
+ // These are the entry points used to compile the target application
55
+ entries: {
56
+ scss: './sass/main.scss',
57
+ js: './js/main.js',
58
+ bundle: './js/main.js',
59
+ components: ['./test_components'],
60
+ patterns: ['./test_patterns'],
61
+ },
62
+ // These are the asset zip file download links
63
+ assets_zip_links: {
64
+ icons: null,
65
+ logos: null,
66
+ },
67
+ // Hooks allow you to override the default behavior of the application
68
+ hooks: {
69
+ // Alter the vite css build config
70
+ cssBuildConfig: (config) => {
71
+ return config;
72
+ },
73
+ // Validate each component before it is exported
74
+ validateComponent: (component) => {
75
+ return {};
76
+ },
77
+ // Alter the vite client build config
78
+ clientBuildConfig: (config) => {
79
+ return config;
80
+ },
81
+ // Alter the vite html build config
82
+ htmlBuildConfig: (config) => {
83
+ return config;
84
+ },
85
+ // Alter the vite js build config
86
+ jsBuildConfig: (config) => {
87
+ return config;
88
+ },
89
+ },
90
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "handoff-app",
3
- "version": "1.2.0",
3
+ "version": "1.2.1-1",
4
4
  "description": "Automated documentation toolchain for building client side documentation from figma",
5
5
  "author ": {
6
6
  "name": "Convertiv",
@@ -17,7 +17,7 @@ export const getAllStrategies = (): ConfigDiffStrategy[] =>
17
17
  * Called after component rebuilds so derived artifacts stay up-to-date.
18
18
  */
19
19
  export const runAllFinalizers = async (handoff: Handoff, context?: FinalizeContext): Promise<void> => {
20
- for (const strategy of strategies.values()) {
20
+ for (const strategy of Array.from(strategies.values())) {
21
21
  await strategy.finalize(handoff, context);
22
22
  }
23
23
  };
@@ -23,7 +23,7 @@ export const diffMapSnapshots = (
23
23
  ): string[] => {
24
24
  const affected = new Set<string>();
25
25
 
26
- for (const [key, oldEntries] of oldSnapshot) {
26
+ for (const [key, oldEntries] of Array.from(oldSnapshot)) {
27
27
  const newEntries = newSnapshot.get(key);
28
28
  if (!newEntries) {
29
29
  affected.add(key);
@@ -33,7 +33,7 @@ export const diffMapSnapshots = (
33
33
  affected.add(key);
34
34
  continue;
35
35
  }
36
- for (const [subKey, oldValue] of oldEntries) {
36
+ for (const [subKey, oldValue] of Array.from(oldEntries)) {
37
37
  if (newEntries.get(subKey) !== oldValue) {
38
38
  affected.add(key);
39
39
  break;
@@ -41,7 +41,7 @@ export const diffMapSnapshots = (
41
41
  }
42
42
  }
43
43
 
44
- for (const key of newSnapshot.keys()) {
44
+ for (const key of Array.from(newSnapshot.keys())) {
45
45
  if (!oldSnapshot.has(key)) {
46
46
  affected.add(key);
47
47
  }
package/src/cli.ts CHANGED
@@ -19,7 +19,7 @@ class HandoffCliError extends Error {
19
19
  * Show the help message
20
20
  */
21
21
  const showVersion = () => {
22
- return 'Handoff App - 1.2.0';
22
+ return 'Handoff App - 1.2.1';
23
23
  };
24
24
 
25
25
  /**