@afterpack/svelte 1.0.0 → 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 +253 -0
- package/package.json +6 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
The full changelog, including cloud and dashboard changes, is at https://www.afterpack.dev/changelog.
|
|
4
|
+
|
|
5
|
+
## 1.0.1 - 2026-10-24
|
|
6
|
+
|
|
7
|
+
One receipt for several builds, and release notes in every package
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **CLI:** `afterpack verify` also counts the JavaScript files in the directory that the receipt doesn't list, such as scripts your pipeline copies in. The count is information only and never changes the exit code. ([Files the receipt doesn't list](https://www.afterpack.dev/docs/cli#files-the-receipt-doesnt-list))
|
|
12
|
+
- **CLI:** Every `--diagnostics.format=json` document starts with `schemaVersion: 1`.
|
|
13
|
+
- **Plugins:** Every package ships a `CHANGELOG.md`, and each GitHub release carries its release notes.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **Docs:** The presets page explains why output size changes between builds and how to set a size budget. ([Size budget](https://www.afterpack.dev/docs/presets#size-budget))
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- **Plugins:** Several AfterPack builds into one output directory now share one protection receipt, so `afterpack verify` checks the files of every build. Before, each build replaced the receipt and `verify` checked only the last one. If you merged receipts yourself to work around this, you can remove that step. ([Several builds into one directory](https://www.afterpack.dev/docs/cli#several-builds-into-one-directory))
|
|
22
|
+
- **Plugins:** `require("@afterpack/vite/package.json")` and the same for every other package now resolve.
|
|
23
|
+
|
|
24
|
+
## 1.0.0 - 2026-10-23
|
|
25
|
+
|
|
26
|
+
AfterPack 1.0, Vite 6 or newer and engine 1.0.0
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- **CLI:** The build log names the engine version that ran: your installed `@afterpack/core` for a local build, or the cloud engine for a Pro build. The CLI's "Protected" summary ends with it too.
|
|
31
|
+
- **Cloud:** status.afterpack.dev shows whether the API and the website are up, with 90 days of daily uptime. `GET /v1/status` returns the same data. ([Status API](https://www.afterpack.dev/docs/status-api))
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- **Engine:** The engine, the CLI and all 13 plugins are now 1.0.0. Across 1.x, your configuration, CLI commands, exit codes and plugin options keep working as they do today. Output bytes may change between releases, but the protected program behaves the same.
|
|
36
|
+
- **Plugins:** Upgrade every AfterPack package together: the 1.0 CLI and plugins refuse an `@afterpack/core` older than 1.0.
|
|
37
|
+
- **Cloud:** Pro cloud builds need AfterPack 1.0: the CLI, the plugins, `@afterpack/core` or `@afterpack/wasm`. The cloud refuses a 0.x client and names the command to upgrade. From 1.0 on, the cloud keeps serving every released 1.x client. ([Pro](https://www.afterpack.dev/docs/pro))
|
|
38
|
+
- **Plugins:** The Protection Map lists each readable string once, with a count, and Show in code steps through every place it appears. Property names, which usually have to stay readable, no longer count as weak spots.
|
|
39
|
+
- **Cloud:** Pro builds now run engine 1.0.0.
|
|
40
|
+
- **Docs:** Every package README checks a build with `npx afterpack@latest verify` and says when a Protection Map is written. ([Protection Map](https://www.afterpack.dev/docs/protection-map))
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- **Engine:** React Router 7 framework-mode apps now hydrate: a function declared inside a block in strict-mode code no longer breaks a reference to the same name elsewhere in its function.
|
|
45
|
+
- **Engine:** A function that declares a nested function named like one of its parameters no longer fails to load with "Identifier has already been declared".
|
|
46
|
+
- **Engine:** A `'use strict'` that comes after other code in a function, or is written with escapes, no longer turns on strict mode.
|
|
47
|
+
- **Plugins:** Every plugin's protection receipt now records the bundler that built the output instead of `unknown`.
|
|
48
|
+
- **Plugins:** The Protection Map's directive legend lists only the directives that exist today. A map saved by an older version still opens.
|
|
49
|
+
|
|
50
|
+
### Removed
|
|
51
|
+
|
|
52
|
+
- **Plugins:** Vite 5 support: `@afterpack/vite`, `@afterpack/vue`, `@afterpack/svelte`, `@afterpack/sveltekit` and `@afterpack/electron` now need Vite 6, 7 or 8.
|
|
53
|
+
- **Plugins:** Svelte 4 and SvelteKit 1 support, since they run only on older Vite: `@afterpack/svelte` needs Svelte 5 and `@afterpack/sveltekit` needs SvelteKit 2.
|
|
54
|
+
|
|
55
|
+
## 0.2.7 - 2026-10-19
|
|
56
|
+
|
|
57
|
+
Stricter region directives on Free, `key` in core and engine 0.2.8
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
|
|
61
|
+
- **Engine:** A tool that wraps `@afterpack/core` or `@afterpack/wasm` can name itself in cloud calls through the `client` option.
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
- **Docs:** The directive docs now say plainly that per-region directives are a Pro feature; Free controls whole files through `paths.exclude`.
|
|
66
|
+
|
|
67
|
+
### Fixed
|
|
68
|
+
|
|
69
|
+
- **Engine:** A Free build now stops when a region directive raises `inflation.max` above the build's budget, like every other directive that adds protection.
|
|
70
|
+
- **Engine:** The secrets report no longer flags constant names such as `MAX_RETRIES` as keys, and now flags licence keys and UUIDs.
|
|
71
|
+
- **Engine:** `@afterpack/core` accepts `key` in the config, as its readme and types say.
|
|
72
|
+
|
|
73
|
+
## 0.2.6 - 2026-10-17
|
|
74
|
+
|
|
75
|
+
More strings encoded, corrected Protection Map classes and engine 0.2.7
|
|
76
|
+
|
|
77
|
+
### Changed
|
|
78
|
+
|
|
79
|
+
- **Engine:** The Protection Map now labels control-flow flattening, mixed boolean arithmetic, opaque predicates, cross-dependency entanglement and integer-expression bytecode as renamed & encoded (polynomial-injective), not flattened & fused. A static attacker can recover the original structure from each of them, so no transform that ships today is labelled flattened & fused. The transforms themselves are unchanged. ([Reversal classes](https://www.afterpack.dev/docs/reversal-classes))
|
|
80
|
+
- **Engine:** `obfuscate` and `obfuscateAll` in `@afterpack/core`, and `@afterpack/wasm`, now send their package name and version with each cloud build, as the CLI and plugins already do.
|
|
81
|
+
- **Cloud:** Large Pro builds finish sooner: the cloud builds several of their files in parallel.
|
|
82
|
+
- **Cloud:** Pro builds now run engine 0.2.7.
|
|
83
|
+
- **Docs:** The threat model and performance pages now give measured results, including how well AI models reverse protected code and what each preset costs at runtime. The package READMEs now say what self-integrity checks. ([Threat model](https://www.afterpack.dev/docs/threat-model), [Performance](https://www.afterpack.dev/docs/performance))
|
|
84
|
+
- **Docs:** The CLI page covers content-hashed renames, per-directory backups, interrupted runs and locks. ([CLI](https://www.afterpack.dev/docs/cli))
|
|
85
|
+
|
|
86
|
+
### Fixed
|
|
87
|
+
|
|
88
|
+
- **Engine:** Strings inside the object of a member assignment, such as `(r = class { … }).p = v` in minified libraries, are now encoded. They used to stay readable at every preset. Bundles that include such libraries now ship far fewer readable strings. Large bundles take a few percent longer to build.
|
|
89
|
+
- **Engine:** With a Pro key, a region set to `medium` or above in a `light` build now gets `medium`'s string encoding, keyed to a shared runtime value, and so does the rest of that file. Its strings used to keep `light`'s encoding. ([Directives](https://www.afterpack.dev/docs/directives))
|
|
90
|
+
- **Plugins:** `@afterpack/next` no longer warns that the build id is pinned when Next.js generated it. About half of default builds got that warning.
|
|
91
|
+
- **Cloud:** Security scanner: a site no longer gets the "Protected by AfterPack" badge when a script it loads with `fetch()` or XHR could not be read.
|
|
92
|
+
- **Cloud:** Protection Maps opened from a cloud build now show coverage and reversal-class labels, like the local report, with no resistance percentage.
|
|
93
|
+
|
|
94
|
+
## 0.2.5 - 2026-10-16
|
|
95
|
+
|
|
96
|
+
CLI renames content-hashed files, safer restore and engine 0.2.6
|
|
97
|
+
|
|
98
|
+
### Added
|
|
99
|
+
|
|
100
|
+
- **CLI:** On Next.js, Angular, Vite and webpack output, the CLI now renames each content-hashed file to match its obfuscated bytes and rewrites every reference to it, as the plugins do. Other output keeps its names and prints a notice. ([Content-hashed file names](https://www.afterpack.dev/docs/cli#content-hashed-file-names))
|
|
101
|
+
|
|
102
|
+
### Changed
|
|
103
|
+
|
|
104
|
+
- **CLI:** `afterpack restore` returns the original tree byte for byte, renames included, and finishes a run that was stopped partway. A new run refuses until an interrupted one is restored. Output files are written through a temporary file, so a killed run never leaves a half-written file. Restore refuses a file that was rebuilt since the run and says how to recover. ([A run that stopped partway](https://www.afterpack.dev/docs/cli#a-run-that-stopped-partway))
|
|
105
|
+
- **CLI:** Backups are kept per build directory in `.afterpack/backups/`, each with a lock, so parallel runs over one directory are refused and separate apps in one repository keep separate backups. A backup in the old `.afterpack/backup/` still restores. ([Parallel runs and locks](https://www.afterpack.dev/docs/cli#parallel-runs-and-locks))
|
|
106
|
+
- **Plugins:** `@afterpack/angular` tells the engine which files are ES modules and which are classic scripts, so a build that mixes them no longer falls back to `auto` for every file. ([sourceType](https://www.afterpack.dev/docs/config#sourceType))
|
|
107
|
+
- **Engine:** When `@afterpack/wasm` runs out of memory, it now fails with `DIAG_OUT_OF_MEMORY` and says how to fix it, instead of a generic internal-limit error.
|
|
108
|
+
- **Cloud:** Pro files that need more memory than a regular cloud build has now run on a larger build machine instead of failing.
|
|
109
|
+
- **Cloud:** Pro builds now run engine 0.2.6.
|
|
110
|
+
- **Docs:** Performance lists what the missing-global check costs at each preset. ([Performance](https://www.afterpack.dev/docs/performance))
|
|
111
|
+
|
|
112
|
+
### Fixed
|
|
113
|
+
|
|
114
|
+
- **Cloud:** Absolute local paths that earlier CLI and plugin versions sent with cloud builds are removed from stored diagnostics and Protection Maps.
|
|
115
|
+
|
|
116
|
+
## 0.2.4 - 2026-10-14
|
|
117
|
+
|
|
118
|
+
Hashed names follow obfuscated bytes, no source maps in production and engine 0.2.5
|
|
119
|
+
|
|
120
|
+
### Added
|
|
121
|
+
|
|
122
|
+
- **Plugins:** `@afterpack/next` warns when a fixed build id keeps `_buildManifest.js` and `_ssgManifest.js` on the same cached URL across releases.
|
|
123
|
+
- **CLI:** `afterpack verify` checks a framework's deploy copy of its output, such as SvelteKit's `build/`, Nuxt's `.output/public/` or a Next.js static `out/`.
|
|
124
|
+
- **Engine:** `obfuscate`, `obfuscateAll` and `processBatch` accept a `sourceType` for each file, for builds that mix ES modules and classic scripts. `@afterpack/angular` now says when its whole output is ES modules. ([sourceType](https://www.afterpack.dev/docs/config#sourceType))
|
|
125
|
+
- **Cloud:** A Pro build with `protectionMap.enabled` now prints a link to its Protection Map in the dashboard, or says that none was stored. ([Protection Map](https://www.afterpack.dev/docs/protection-map))
|
|
126
|
+
|
|
127
|
+
### Changed
|
|
128
|
+
|
|
129
|
+
- **Plugins:** Precompressed `.gz` and `.br` copies now hold the obfuscated code, and Angular's integrity attributes and service-worker hashes are recomputed from it. The Vite and webpack plugins refuse a build that also runs a subresource-integrity plugin, whose hashes would pin the unobfuscated bytes.
|
|
130
|
+
- **Engine:** At `medium` and above, the integer-expression interpreter runs faster in hot loops, and its code is smaller.
|
|
131
|
+
- **Cloud:** Pro builds now run engine 0.2.5.
|
|
132
|
+
- **Dashboard:** Billing activity shows what each payment charged, tax included, and long payment references no longer overflow its details card.
|
|
133
|
+
- **Docs:** Builds gains File names and caching, and the CLI and framework pages cover the new naming, source-map, receipt and integrity behavior.
|
|
134
|
+
|
|
135
|
+
### Fixed
|
|
136
|
+
|
|
137
|
+
- **Plugins:** In the Vite, Rollup, webpack, esbuild, Next.js and Angular plugins, content-hashed file names now follow the obfuscated bytes, so a name never points at different code from one build to the next. Obfuscated files used to ship under the plain build's names, so immutable caches and service workers could keep serving the previous file. A fresh seed now renames every obfuscated file, and a constant seed keeps unchanged files cached. ([File names and caching](https://www.afterpack.dev/docs/builds#file-names-and-caching))
|
|
138
|
+
- **CLI:** Every build is now production unless it says development, and production builds delete the bundler's source maps, CSS maps included. A local `npx afterpack dist/` used to leave maps that contained your original source. A build is development only with `build.mode` set to `development` or `NODE_ENV=development`. A map that cannot be removed fails the build. The CLI and every plugin behave the same way. ([build.mode](https://www.afterpack.dev/docs/config#build-mode))
|
|
139
|
+
- **CLI:** The protection receipt is now written to `.afterpack/receipts/` instead of the build output, so it no longer ships with your site. A leftover `.afterpack-protection.json` is removed. `.afterpack/` sits next to the nearest lockfile, `afterpack.json` or `.git` above the build directory, so every working directory and plugin finds the same one, and a second run over protected output is refused from anywhere. ([Files](https://www.afterpack.dev/docs/cli#files))
|
|
140
|
+
- **CLI:** Cloud builds now name files by their path inside the build directory, never by an absolute path with your home directory or username. Local output is unchanged.
|
|
141
|
+
- **CLI:** `afterpack audit` refuses a local path such as `./dist` instead of sending it to the scanner as a URL.
|
|
142
|
+
- **Cloud:** The cloud no longer stores or logs the absolute local paths that earlier CLI and plugin versions send.
|
|
143
|
+
|
|
144
|
+
## 0.2.3 - 2026-10-11
|
|
145
|
+
|
|
146
|
+
Fail-closed builds, new exit codes and engine 0.2.4
|
|
147
|
+
|
|
148
|
+
### Changed
|
|
149
|
+
|
|
150
|
+
- **Plugins:** Update `afterpack` and your `@afterpack/*` plugins to 0.2.3 together with the engine. Versions 0.2.2 and earlier fail every file with engine 0.2.4, which a fresh install or a lockfile update can pull in. With an older CLI or plugin, each file fails with "the engine result does not say whether the file was obfuscated". Upgrading the CLI and plugins fixes it.
|
|
151
|
+
- **Engine:** In `@afterpack/core`, a file whose output fails to re-parse now fails with `DIAG_OUTPUT_UNPARSEABLE` and no code, instead of returning the original source. The `unobfuscated` result field is removed. ([Diagnostics](https://www.afterpack.dev/docs/diagnostics#complete-reference))
|
|
152
|
+
- **CLI:** The CLI exits `4` when a `regions` entry needs a Pro key and `5` when a runtime-reflection pattern is not acknowledged. Both exited `1` before. ([Exit codes](https://www.afterpack.dev/docs/diagnostics#exit-codes))
|
|
153
|
+
- **Engine:** An unacknowledged runtime-reflection pattern now fails with `DIAG_REFLECTION_NOT_ACKNOWLEDGED`, and the message names the `reflection.allow` value to add. The code used to be the pattern's name. ([reflection.allow](https://www.afterpack.dev/docs/config#reflection-allow))
|
|
154
|
+
- **Engine:** At `medium` and above, 32-bit constants from `0x80000000` to `0xFFFFFFFF`, such as hash seeds, are now encoded like other integers instead of appearing as written.
|
|
155
|
+
- **Engine:** At `medium` and above, more bitwise `&` and `|` expressions are transformed, including `BigInt` ones such as `(n >> i) & 1n`.
|
|
156
|
+
- **Engine:** At `light`, encoded strings no longer come out looking like words.
|
|
157
|
+
- **Engine:** The string decoder's setup code now varies from build to build instead of being spelled the same in every output.
|
|
158
|
+
- **Cloud:** Pro builds now run engine 0.2.4.
|
|
159
|
+
- **Docs:** Diagnostics, CLI and Directives cover exit codes `4` and `5`, and say when `DIAG_INFLATION_BUDGET_HIT` fires.
|
|
160
|
+
|
|
161
|
+
### Fixed
|
|
162
|
+
|
|
163
|
+
- **Engine:** Free builds no longer refuse a region that turns on `strings.encode` when string encoding is already on, as it is at `light` and above. ([Free builds](https://www.afterpack.dev/docs/directives#free-builds))
|
|
164
|
+
- **Engine:** With `identifiers.methods.rename: false`, a class method that uses an outer variable with the same name as the method now reads that variable, not the method itself. ([identifiers.methods.rename](https://www.afterpack.dev/docs/config#identifiers-methods-rename))
|
|
165
|
+
|
|
166
|
+
### Removed
|
|
167
|
+
|
|
168
|
+
- **CLI:** `allowUnobfuscated` is removed: a file the engine cannot protect always fails the build and never ships as the original source. The CLI, the plugins and `afterpack.json` now reject it as an unknown option, so remove it if you set it. The CLI no longer exits `2`. ([Fail closed](https://www.afterpack.dev/docs/diagnostics#fail-closed-no-exceptions))
|
|
169
|
+
|
|
170
|
+
## 0.2.2 - 2026-10-03
|
|
171
|
+
|
|
172
|
+
Correctness fixes and engine 0.2.3
|
|
173
|
+
|
|
174
|
+
### Added
|
|
175
|
+
|
|
176
|
+
- **Plugins:** The plugins and the CLI tell the engine when your build output is ES modules, from the bundler's output format or, in the CLI, from `.mjs` files and `<script type="module">` in your built HTML. The new `sourceType` option overrides it. ([sourceType](https://www.afterpack.dev/docs/config#sourceType))
|
|
177
|
+
- **Docs:** A new Semantic contract page lists what obfuscated output keeps the same and the few deliberate differences. Diagnostics, Presets and Directives cover engine 0.2.3 behavior.
|
|
178
|
+
|
|
179
|
+
### Changed
|
|
180
|
+
|
|
181
|
+
- **Engine:** A build that cannot reach its complexity target because a transform is turned off or a region directive limits it now fails with `DIAG_TARGET_NOT_REACHED`, naming the file and lines. Before, it shipped weaker output.
|
|
182
|
+
- **Engine:** Pro: `transforms.selfIntegrity` on a build with no code at `medium` or above now fails with `DIAG_SELF_INTEGRITY_INERT` instead of shipping without the check.
|
|
183
|
+
- **Engine:** `minify` now only renames identifiers and compresses the code. It no longer rewrites syntax. ([Presets](https://www.afterpack.dev/docs/presets))
|
|
184
|
+
- **Engine:** Loops are no longer rewritten into callback helpers at `minify` and `light`, which removes the 2-5x slowdown those helpers caused in hot loops. At `light`, property and global names still go through encoded constants, which has some cost in very hot code.
|
|
185
|
+
- **Engine:** `light` output is smaller: about 30% less gzipped on real bundles, most of all on string-heavy files such as translation tables.
|
|
186
|
+
- **Engine:** The engine is smaller: `@afterpack/wasm` downloads about 17% fewer gzipped bytes.
|
|
187
|
+
- **CLI:** The Protection Map shows coverage: each region lists the transforms applied to it and why any code stays readable. It no longer shows a resistance percentage. ([Protection Map](https://www.afterpack.dev/docs/protection-map))
|
|
188
|
+
- **Cloud:** Pro builds now run engine 0.2.3.
|
|
189
|
+
|
|
190
|
+
### Fixed
|
|
191
|
+
|
|
192
|
+
- **Engine:** Fixed cases where obfuscated code could behave differently from the original, at every preset. Most date back to 0.1, so rebuild with this release. Each engine release is now checked against real libraries and multi-script pages before it ships. The items below list the fixes; the new Semantic contract page lists what output keeps the same and the few deliberate differences. ([Semantic contract](https://www.afterpack.dev/docs/semantic-contract))
|
|
193
|
+
- **Engine:** Classic scripts keep their top-level functions and variables on the global object, so other scripts on the page can still use them, and references to globals declared elsewhere behave as in the original.
|
|
194
|
+
- **Engine:** An ES module with no `import` or `export` is no longer read as a classic script when a plugin, the CLI or the `sourceType` option says the output is ES modules, so its top-level names stay off `window`. With none of those, the engine still tells the kind from the syntax, and a file without `import` or `export` is read as a classic script.
|
|
195
|
+
- **Engine:** Values inside template literals are converted to text the way the original does, so objects such as dates format correctly.
|
|
196
|
+
- **Engine:** Functions your code later constructs, through `extends`, a `Proxy`, a stored reference or an export, stay constructible.
|
|
197
|
+
- **Engine:** Class fields are defined the way native fields are, so a field over an inherited accessor works, as in custom elements, and a class called without `new` throws.
|
|
198
|
+
- **Engine:** A function that refers to itself keeps one identity, so an event listener that removes itself is removed.
|
|
199
|
+
- **Engine:** `BigInt` arithmetic no longer throws or returns wrong values at `medium` and above, a regression in 0.2.
|
|
200
|
+
- **Engine:** At `medium` and above, arithmetic converts each object operand once, as the original does, and output no longer breaks when another script changes `valueOf` or `toString` on shared objects.
|
|
201
|
+
- **Engine:** Direct `eval` and `with` keep their scope: the code around them stays as written, and the build reports it with `DIAG_DYNAMIC_SCOPE_NATIVE`. ([Diagnostics](https://www.afterpack.dev/docs/diagnostics))
|
|
202
|
+
- **Engine:** Classes and constructors keep their original name when your code reads `this.constructor.name` or `new.target.name`, so custom error classes report their own name. ([Semantic contract](https://www.afterpack.dev/docs/semantic-contract#deliberate-differences))
|
|
203
|
+
- **Engine:** Also fixed: `async` ordering, a `catch (e)` block that declares `var e`, optional calls in parentheses such as `(o?.m)()`, `delete` in strict code, nested loops that multiplied output size at `medium` and above, and constant `**` results that could differ from the browser in the last digit.
|
|
204
|
+
- **Engine:** An explicit `inflation.max` now checks the finished file and fails the build with `DIAG_SIZE_CAP_REACHED` when output reaches it. String encoding always completes first. In earlier versions, a tight `inflation.max` could stop string encoding early and leave some strings readable, reported only as an Info diagnostic. If you set `inflation.max`, rebuild with this release. ([inflation.max](https://www.afterpack.dev/docs/config#inflation-max))
|
|
205
|
+
- **Engine:** Free builds no longer refuse a directive that only lowers protection, such as a transform mask or a lower preset. Like other directives on Free, it is ignored. ([Free builds](https://www.afterpack.dev/docs/directives#free-builds))
|
|
206
|
+
|
|
207
|
+
## 0.2.1 - 2026-10-01
|
|
208
|
+
|
|
209
|
+
CSS source maps, Parcel receipts and engine 0.2.2
|
|
210
|
+
|
|
211
|
+
### Added
|
|
212
|
+
|
|
213
|
+
- **Plugins:** Parcel builds now get a protection receipt, so `afterpack verify` works for them. Add `--reporter @afterpack/parcel-optimizer/reporter` to your `parcel build` command.
|
|
214
|
+
|
|
215
|
+
### Changed
|
|
216
|
+
|
|
217
|
+
- **Engine:** Engine 0.2.2 is a build-only release: its output is the same as 0.2.1. Pro builds run it too.
|
|
218
|
+
|
|
219
|
+
### Fixed
|
|
220
|
+
|
|
221
|
+
- **Plugins:** `@afterpack/next` now deletes CSS source maps from `.next/static` along with the JavaScript ones, and strips the comments that point to them. Earlier versions removed only JavaScript maps, so with `productionBrowserSourceMaps` on, your original stylesheets could be served with the site. The webpack, Rollup and Vite plugins now also drop CSS maps when your build ships no source maps. ([Next.js guide](https://www.afterpack.dev/docs/frameworks/nextjs))
|
|
222
|
+
|
|
223
|
+
## 0.2.0 - 2026-09-30
|
|
224
|
+
|
|
225
|
+
Per-token presets and engine 0.2.1 (breaking)
|
|
226
|
+
|
|
227
|
+
### Changed
|
|
228
|
+
|
|
229
|
+
- **Engine:** Presets are recalibrated for per-token protection: `medium`, `hard` and `extreme` now apply their complexity target (7, 12 and 25) to every token, where 0.1 targeted an average across the file. Output at these presets is considerably larger than in 0.1, and presets no longer cap output size. If you set `complexity` yourself, review the value, because it is now a per-token target. `light`, the default, adds no structural layers: it encodes strings, renames identifiers and rewrites syntax, and its output is about the same size as in 0.1. ([Presets](https://www.afterpack.dev/docs/presets))
|
|
230
|
+
- **Plugins:** The Protection Map now shades each token by how much transformation it received and lists the declarations the engine rewrote, in local reports and in the dashboard. ([Protection Map](https://www.afterpack.dev/docs/protection-map))
|
|
231
|
+
- **Plugins:** The CLI and plugins now require engine 0.2 or newer and refuse an older one. `preset=` directives resolve on the new scale.
|
|
232
|
+
- **Plugins:** The CLI and plugins no longer edit your project's `.gitignore`, because `.afterpack/` now carries its own. In CI, the Protection Map is off by default unless you set `protectionMap.enabled`.
|
|
233
|
+
- **Cloud:** Pro builds now run engine 0.2.1, and builds from 0.2 packages get up to 4 minutes in the cloud (was 90 seconds). If you use a Pro key, update the CLI or plugin too. A 0.1 package with no preset set, or with `preset=` directives, sends values on the old scale, so its cloud builds come out heavier than intended. ([Pro](https://www.afterpack.dev/docs/pro))
|
|
234
|
+
- **Docs:** Docs and package READMEs are updated for 0.2, including the preset scale, the Protection Map, and where each integration runs in your build.
|
|
235
|
+
|
|
236
|
+
### Fixed
|
|
237
|
+
|
|
238
|
+
- **Engine:** Fixed a miscompile in which code inside a rewritten `switch`, a `?.` or `??` expression, or a class with private fields could read the wrong variable. It depended on the build seed and on a variable's name, original or renamed, matching one the engine uses internally. Affected code could throw or return wrong values.
|
|
239
|
+
- **Engine:** Functions stored on objects now stay constructible. 0.1 could turn them into arrow functions, which broke feature detection in polyfill libraries such as core-js.
|
|
240
|
+
- **Engine:** `obfuscate()` and `obfuscateAll()` in `@afterpack/core` and `@afterpack/wasm` now draw a fresh seed for each build when you don't pass one. In 0.1, every build of the same source came out identical. The CLI and plugins were not affected. ([seed](https://www.afterpack.dev/docs/config#seed))
|
|
241
|
+
- **Engine:** Input nested too deeply to process safely now fails with a clear diagnostic instead of crashing `@afterpack/wasm`. A long-running `@afterpack/wasm` instance also no longer grows its memory with every file. ([Workers](https://www.afterpack.dev/docs/workers))
|
|
242
|
+
|
|
243
|
+
## 0.1.0 - 2026-09-25
|
|
244
|
+
|
|
245
|
+
CLI, framework plugins and engine
|
|
246
|
+
|
|
247
|
+
### Added
|
|
248
|
+
|
|
249
|
+
- **CLI:** `npx afterpack` protects a build directory or a single file in place. `verify` checks a build against its protection receipt before deploy, `restore` undoes the last run, and `audit` scans a live site. ([CLI](https://www.afterpack.dev/docs/cli))
|
|
250
|
+
- **Plugins:** Plugins for Vite, Next.js, webpack, Rollup, esbuild, Astro, Svelte, SvelteKit, Vue, Nuxt, Angular, Electron and Parcel. ([Framework guides](https://www.afterpack.dev/docs/frameworks))
|
|
251
|
+
- **Engine:** `@afterpack/core` runs locally on macOS, Linux (x64 and arm64, glibc and musl) and Windows x64. `@afterpack/wasm` runs the same engine in Cloudflare Workers and Node. ([Workers](https://www.afterpack.dev/docs/workers))
|
|
252
|
+
- **Plugins:** The Protection Map is a local HTML report that shows what each part of your code went through. It is written to `.afterpack/` when your build has source maps. ([Protection Map](https://www.afterpack.dev/docs/protection-map))
|
|
253
|
+
- **Docs:** The CLI and plugins are open source under Apache-2.0. The engine is free to use under the AfterPack Engine License. ([License](https://www.afterpack.dev/license))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@afterpack/svelte",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Svelte plugin for AfterPack: obfuscate a Svelte app's production JavaScript during the Vite build",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -17,9 +17,11 @@
|
|
|
17
17
|
"default": "./dist/index.cjs"
|
|
18
18
|
},
|
|
19
19
|
"default": "./dist/index.js"
|
|
20
|
-
}
|
|
20
|
+
},
|
|
21
|
+
"./package.json": "./package.json"
|
|
21
22
|
},
|
|
22
23
|
"files": [
|
|
24
|
+
"CHANGELOG.md",
|
|
23
25
|
"LICENSE",
|
|
24
26
|
"NOTICE",
|
|
25
27
|
"dist"
|
|
@@ -29,8 +31,8 @@
|
|
|
29
31
|
"vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
30
32
|
},
|
|
31
33
|
"dependencies": {
|
|
32
|
-
"@afterpack/integration-utils": "1.0.
|
|
33
|
-
"@afterpack/vite": "1.0.
|
|
34
|
+
"@afterpack/integration-utils": "1.0.1",
|
|
35
|
+
"@afterpack/vite": "1.0.1"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
|
36
38
|
"@biomejs/biome": "2.4.4",
|