@afterpack/next 0.2.7 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +8 -6
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -39,9 +39,9 @@ the comments that point at them, since a served source map gives your source awa
39
39
 
40
40
  Each build writes `.afterpack/receipts/.next.json`, a receipt with a hash per obfuscated file.
41
41
  `.afterpack/` sits next to your project's lockfile, `afterpack.json` or `.git` (failing those, its
42
- `package.json`), out of `.next/`, so it never ships with the build. Run `npx afterpack verify .`
43
- before you deploy. It fails when the receipt is missing, belongs to a different build, or a file
44
- changed after obfuscation.
42
+ `package.json`), out of `.next/`, so it never ships with the build. Run
43
+ `npx afterpack@latest verify .` before you deploy. It fails when the receipt is missing, belongs to
44
+ a different build, or a file changed after obfuscation.
45
45
 
46
46
  ## Options
47
47
 
@@ -54,7 +54,7 @@ Pass them as the second argument: `withAfterpack(nextConfig, { preset: "hard", s
54
54
  | [`identifiers.reserved`][identifiers.reserved] | names never to rename | none |
55
55
  | [`paths.exclude`][paths.exclude] | globs for files to leave untouched | none |
56
56
  | [`sourceMap.enabled`][sourceMap.enabled] | write source maps for the obfuscated output | off; on in development mode (`build.mode` or `NODE_ENV=development`) when an input map exists |
57
- | [`protectionMap.enabled`][protectionMap.enabled] | write the Protection Map | on when Next emits browser source maps |
57
+ | [`protectionMap.enabled`][protectionMap.enabled] | write the Protection Map | on when Next emits browser source maps, outside CI |
58
58
  | [`build.autorun`][build.autorun] | `false` turns AfterPack off | `true` |
59
59
 
60
60
  Dotted names are nested objects: `build.backup` is `{ build: { backup: true } }`. Every
@@ -71,8 +71,10 @@ other option is in the [configuration reference](https://www.afterpack.dev/docs/
71
71
  `/* @afterpack */` [directives](https://www.afterpack.dev/docs/directives) that raise protection for
72
72
  a region are a [Pro](https://www.afterpack.dev/docs/pro) feature. They and a readable [Protection
73
73
  Map](https://www.afterpack.dev/docs/protection-map) both need `productionBrowserSourceMaps: true` in
74
- your Next config. The Protection Map is written to `.afterpack/`, which carries its own `.gitignore`
75
- and self-ignores. It contains your original source, so never deploy or commit it.
74
+ your Next config. With browser source maps, the Protection Map is written to `.afterpack/`, which
75
+ carries its own `.gitignore` and self-ignores; without them, or in CI, it is off unless
76
+ `protectionMap.enabled` is `true`. It contains your original source, so never deploy or commit
77
+ it.
76
78
 
77
79
  Options can also live in `afterpack.json` or in `AFTERPACK_*` environment variables. The options
78
80
  object wins over the environment, which wins over the file. An unknown or misspelled key fails the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afterpack/next",
3
- "version": "0.2.7",
3
+ "version": "1.0.0",
4
4
  "description": "Next.js integration for AfterPack: obfuscate the client JavaScript of a Next.js build inside next build",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -28,15 +28,15 @@
28
28
  "next": ">=15.4.0"
29
29
  },
30
30
  "dependencies": {
31
- "@afterpack/core": "~0.2.8",
32
- "@afterpack/integration-utils": "0.2.7"
31
+ "@afterpack/core": "~1.0.0",
32
+ "@afterpack/integration-utils": "1.0.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@biomejs/biome": "2.4.4",
36
36
  "@types/node": "^22.0.0",
37
37
  "tsdown": "^0.11.0",
38
38
  "typescript": "^5.0.0",
39
- "vitest": "^2.0.0"
39
+ "vitest": "^4.1.12"
40
40
  },
41
41
  "engines": {
42
42
  "node": ">=18"