@procore/hammer-lib-tsup 0.9.1 → 1.0.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 +25 -0
- package/README.md +41 -24
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @procore/hammer-lib-tsup
|
|
2
2
|
|
|
3
|
+
## 1.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2400f21: Update package runtime dependencies and source updates across Hammer packages.
|
|
8
|
+
- Updated dependencies [2400f21]
|
|
9
|
+
- Updated dependencies [1d23401]
|
|
10
|
+
- Updated dependencies [1d23401]
|
|
11
|
+
- @procore/hammer-utils@1.0.1
|
|
12
|
+
- @procore/hammer-types@1.2.0
|
|
13
|
+
|
|
14
|
+
## 1.0.0
|
|
15
|
+
|
|
16
|
+
### Major Changes
|
|
17
|
+
|
|
18
|
+
- d10edb3: First general release. No breaking changes from prior releases.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- d6e8e38: Upgrades dependencies.
|
|
23
|
+
- Updated dependencies [d6e8e38]
|
|
24
|
+
- Updated dependencies [d10edb3]
|
|
25
|
+
- @procore/hammer-utils@1.0.0
|
|
26
|
+
- @procore/hammer-types@1.0.0
|
|
27
|
+
|
|
3
28
|
## 0.9.1
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -16,24 +16,54 @@ yarn add -D @procore/hammer-lib-tsup
|
|
|
16
16
|
|
|
17
17
|
Custom configuration is done using the `hammer` configuration file. The customization key is `libTsup`, and the configuration that should be returned should be compatible with the tsup `defineConfig` format.
|
|
18
18
|
|
|
19
|
-
```
|
|
19
|
+
```ts
|
|
20
|
+
// hammer.config.ts
|
|
21
|
+
|
|
22
|
+
import { type HammerConfig } from '@procore/hammer-types';
|
|
23
|
+
import '@procore/hammer-lib-tsup';
|
|
24
|
+
|
|
20
25
|
export default {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
/**
|
|
27
|
+
* NOTE: `config` is an array of tsup Options objects:
|
|
28
|
+
* one for modern configuration, and one for legacy configuration
|
|
29
|
+
* Please make sure that any customization you do accounts for
|
|
30
|
+
* both configuration elements.
|
|
31
|
+
*
|
|
32
|
+
* config[0] == modern
|
|
33
|
+
* config[1] == legacy
|
|
34
|
+
*/
|
|
35
|
+
libTsup(config) {
|
|
36
|
+
return [
|
|
37
|
+
{
|
|
38
|
+
...config[0],
|
|
39
|
+
// custom modern config
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
...config[1],
|
|
43
|
+
// custom legacy config
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
},
|
|
47
|
+
} satisfies HammerConfig;
|
|
31
48
|
```
|
|
32
49
|
|
|
33
50
|
**NOTE**: The default configuration should handle nearly all packages. If
|
|
34
51
|
you find that you are doing a lot of customization, or the same change in
|
|
35
52
|
multiple projects, consider reviewing your configuration with the UI Foundations team.
|
|
36
53
|
|
|
54
|
+
### Using `lib:build --analyze`
|
|
55
|
+
|
|
56
|
+
When you run `hammer lib:build --analyze`, it generates the following output files:
|
|
57
|
+
|
|
58
|
+
- `metafile-esm.json`: Metadata for the ESM (ECMAScript Module) output.
|
|
59
|
+
- `metafile-cjs.json`: Metadata for the CJS (CommonJS) output.
|
|
60
|
+
|
|
61
|
+
These files can be used to analyze the bundle, understand the size of individual modules, and identify optimizations.
|
|
62
|
+
|
|
63
|
+
For more detailed information on how the metadata works, refer to the [Tsup Metafile Documentation][tsup-metafile].
|
|
64
|
+
|
|
65
|
+
Additionally, you can use tools like [Bundle Buddy][bundle-buddy] to visualize the output and track down duplicate dependencies or optimize your bundle for better performance.
|
|
66
|
+
|
|
37
67
|
## Development
|
|
38
68
|
|
|
39
69
|
This project uses [`yarn`][yarn], and supports the following commands:
|
|
@@ -48,19 +78,6 @@ This project uses [`yarn`][yarn], and supports the following commands:
|
|
|
48
78
|
- `test:ci`: run the unit test suite, reporting coverage.
|
|
49
79
|
- `lib:build --analyze`: builds the library and generates metadata for bundle analysis.
|
|
50
80
|
|
|
51
|
-
### Using `lib:build --analyze`
|
|
52
|
-
|
|
53
|
-
When you run `hammer lib:build --analyze`, it generates the following output files:
|
|
54
|
-
|
|
55
|
-
- `metafile-esm.json`: Metadata for the ESM (ECMAScript Module) output.
|
|
56
|
-
- `metafile-cjs.json`: Metadata for the CJS (CommonJS) output.
|
|
57
|
-
|
|
58
|
-
These files can be used to analyze the bundle, understand the size of individual modules, and identify optimizations.
|
|
59
|
-
|
|
60
|
-
For more detailed information on how the metadata works, refer to the [Tsup Metafile Documentation][tsup-metafile].
|
|
61
|
-
|
|
62
|
-
Additionally, you can use tools like [Bundle Buddy][bundle-buddy] to visualize the output and track down duplicate dependencies or optimize your bundle for better performance.
|
|
63
|
-
|
|
64
81
|
[bundle-buddy]: https://www.bundle-buddy.com/esbuild
|
|
65
82
|
[eslint]: https://eslint.org/
|
|
66
83
|
[prettier]: https://prettier.io/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@procore/hammer-lib-tsup",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Hammer library builder, tsup-style",
|
|
5
5
|
"author": "Procore Technologies, Inc",
|
|
6
6
|
"homepage": "https://github.com/procore/hammer/packages/lib-tsup",
|
|
@@ -51,29 +51,29 @@
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@procore/hammer-types": "^
|
|
55
|
-
"@procore/hammer-utils": "^0.
|
|
54
|
+
"@procore/hammer-types": "^1.2.0",
|
|
55
|
+
"@procore/hammer-utils": "^1.0.1",
|
|
56
56
|
"cli-highlight": "^2.1.11",
|
|
57
|
-
"esbuild": "^0.
|
|
58
|
-
"esbuild-sass-plugin": "^3.
|
|
57
|
+
"esbuild": "^0.27.4",
|
|
58
|
+
"esbuild-sass-plugin": "^3.7.0",
|
|
59
59
|
"pathe": "^2.0.3",
|
|
60
60
|
"picocolors": "^1.1.1",
|
|
61
|
-
"sass-embedded": "^1.
|
|
62
|
-
"tsup": "^8.5.
|
|
61
|
+
"sass-embedded": "^1.98.0",
|
|
62
|
+
"tsup": "^8.5.1"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@procore/eslint-config": "^15.3.2",
|
|
66
|
-
"@procore/hammer-test-utils": "^0.
|
|
66
|
+
"@procore/hammer-test-utils": "^2.0.0",
|
|
67
67
|
"@procore/prettier-config": "^1.1.1",
|
|
68
68
|
"@procore/typescript-config": "^2.1.0",
|
|
69
|
-
"@types/node": "^20.19.
|
|
70
|
-
"@vitest/coverage-v8": "^
|
|
71
|
-
"del-cli": "^
|
|
72
|
-
"eslint": "^9.
|
|
73
|
-
"postcss": "^8.5.
|
|
74
|
-
"prettier": "^3.
|
|
75
|
-
"strip-ansi": "^7.
|
|
69
|
+
"@types/node": "^20.19.37",
|
|
70
|
+
"@vitest/coverage-v8": "^4.1.2",
|
|
71
|
+
"del-cli": "^7.0.0",
|
|
72
|
+
"eslint": "^9.39.4",
|
|
73
|
+
"postcss": "^8.5.8",
|
|
74
|
+
"prettier": "^3.8.1",
|
|
75
|
+
"strip-ansi": "^7.2.0",
|
|
76
76
|
"typescript": "~5.5.4",
|
|
77
|
-
"vitest": "^
|
|
77
|
+
"vitest": "^4.1.2"
|
|
78
78
|
}
|
|
79
79
|
}
|