@afterpack/astro 1.1.0 → 1.2.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/CHANGELOG.md +19 -0
- package/dist/index.cjs +6 -2
- package/dist/index.js +6 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
The full changelog, including cloud and dashboard changes, is at https://www.afterpack.dev/changelog.
|
|
4
4
|
|
|
5
|
+
## 1.2.0 - 2026-11-28
|
|
6
|
+
|
|
7
|
+
A file list for every build, and excluded files stay local
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Dashboard:** Every Pro cloud build's page lists the files it was made of, each with its size before and after protection, its inflation and its status. Coverage, inflation and complexity show on every build, with or without a Protection Map. ([Builds](https://www.afterpack.dev/docs/dashboard/builds))
|
|
12
|
+
- **Dashboard:** A build's page names the bundle it built, such as `vite.landing.config.ts`, and shows whether it ran in CI, with a link to the run, or locally. The builds list groups the builds of one commit by bundle. The bundle name and the CI details come from the 1.2.0 CLI and plugins.
|
|
13
|
+
- **Plugins:** A Pro cloud build reports the bundle it built, the CI provider and a link to the CI run, for the build's page.
|
|
14
|
+
- **Engine:** The build context in `@afterpack/core` accepts `bundle`, `environment`, `ciProvider` and `ciRunUrl`.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **Plugins:** On a Pro cloud build, files matched by `paths.exclude` are no longer uploaded or billed. They ship unchanged, as before, and still appear in the build's file list. ([paths.exclude](https://www.afterpack.dev/docs/config#paths-exclude))
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **Cloud:** A Pro cloud build no longer hangs when an upload stalls: the stalled part is sent again, and it is not billed twice.
|
|
23
|
+
|
|
5
24
|
## 1.1.0 - 2026-11-28
|
|
6
25
|
|
|
7
26
|
Cloud builds of any size, all-caps variables and empty values that reset
|
package/dist/index.cjs
CHANGED
|
@@ -70,6 +70,7 @@ function assertPlaceholdersPinned(found) {
|
|
|
70
70
|
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region src/index.ts
|
|
73
|
+
const ASTRO = "astro";
|
|
73
74
|
const SERVER_VITE_ENVIRONMENT_NAMES = ["ssr", "prerender"];
|
|
74
75
|
function assertAstroPlaceholdersPinned() {
|
|
75
76
|
let distDir;
|
|
@@ -87,11 +88,14 @@ function afterpackAstro(options = {}) {
|
|
|
87
88
|
hooks: { "astro:config:setup": ({ updateConfig }) => {
|
|
88
89
|
assertAstroPlaceholdersPinned();
|
|
89
90
|
const clientPlugin = {
|
|
90
|
-
...(0, __afterpack_vite.afterpackVite)(options),
|
|
91
|
+
...(0, __afterpack_vite.afterpackVite)(options, { framework: ASTRO }),
|
|
91
92
|
applyToEnvironment: (environment) => environment.name === "client"
|
|
92
93
|
};
|
|
93
94
|
const serverPlugin = {
|
|
94
|
-
...(0, __afterpack_vite.afterpackVite)(options, {
|
|
95
|
+
...(0, __afterpack_vite.afterpackVite)(options, {
|
|
96
|
+
appendLists: SERVER_LISTS,
|
|
97
|
+
framework: ASTRO
|
|
98
|
+
}),
|
|
95
99
|
applyToEnvironment: (environment) => SERVER_VITE_ENVIRONMENT_NAMES.includes(environment.name)
|
|
96
100
|
};
|
|
97
101
|
updateConfig({ vite: { plugins: [clientPlugin, serverPlugin] } });
|
package/dist/index.js
CHANGED
|
@@ -46,6 +46,7 @@ function assertPlaceholdersPinned(found) {
|
|
|
46
46
|
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region src/index.ts
|
|
49
|
+
const ASTRO = "astro";
|
|
49
50
|
const SERVER_VITE_ENVIRONMENT_NAMES = ["ssr", "prerender"];
|
|
50
51
|
function assertAstroPlaceholdersPinned() {
|
|
51
52
|
let distDir;
|
|
@@ -63,11 +64,14 @@ function afterpackAstro(options = {}) {
|
|
|
63
64
|
hooks: { "astro:config:setup": ({ updateConfig }) => {
|
|
64
65
|
assertAstroPlaceholdersPinned();
|
|
65
66
|
const clientPlugin = {
|
|
66
|
-
...afterpackVite(options),
|
|
67
|
+
...afterpackVite(options, { framework: ASTRO }),
|
|
67
68
|
applyToEnvironment: (environment) => environment.name === "client"
|
|
68
69
|
};
|
|
69
70
|
const serverPlugin = {
|
|
70
|
-
...afterpackVite(options, {
|
|
71
|
+
...afterpackVite(options, {
|
|
72
|
+
appendLists: SERVER_LISTS,
|
|
73
|
+
framework: ASTRO
|
|
74
|
+
}),
|
|
71
75
|
applyToEnvironment: (environment) => SERVER_VITE_ENVIRONMENT_NAMES.includes(environment.name)
|
|
72
76
|
};
|
|
73
77
|
updateConfig({ vite: { plugins: [clientPlugin, serverPlugin] } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@afterpack/astro",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Astro integration for AfterPack: obfuscate the client and server JavaScript of an Astro build",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"astro": "^4.0.0 || ^5.0.0 || ^6.0.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@afterpack/integration-utils": "1.
|
|
34
|
-
"@afterpack/vite": "1.
|
|
33
|
+
"@afterpack/integration-utils": "1.2.0",
|
|
34
|
+
"@afterpack/vite": "1.2.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@biomejs/biome": "2.4.4",
|