@sprid/release 1.6.0 → 1.6.2
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 +9 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/asc/index.ts +1 -1
- package/src/asc/retention.ts +5 -2
- package/src/play/client.ts +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
@sprid/release follows semver: a breaking change to a command's arguments, its
|
|
4
4
|
output shape or its exit codes is a major release.
|
|
5
5
|
|
|
6
|
+
## 1.6.2 - 2026-11-19
|
|
7
|
+
|
|
8
|
+
- Google Play listing updates retry without submitting for review when Play requires it. The CLI tells you to submit the saved changes from Publishing overview in Play Console.
|
|
9
|
+
|
|
10
|
+
## 1.6.1 - 2026-11-13
|
|
11
|
+
|
|
12
|
+
- `retention` fails locally on a message body over 144 characters, which App Store
|
|
13
|
+
Connect rejects with a 409 that its help pages do not mention.
|
|
14
|
+
|
|
6
15
|
## 1.6.0 - 2026-11-13
|
|
7
16
|
|
|
8
17
|
- `retention` (`asc-retention`) creates and updates App Store retention messages from
|
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ export default defineReleaseConfig({
|
|
|
60
60
|
|
|
61
61
|
`sprid release retention` sets the text Apple shows when a subscriber starts to cancel.
|
|
62
62
|
Each subscription shows one message, and an app can have ten. Every listing locale needs
|
|
63
|
-
copy. App Review rejects prices and offers in the text, so the local check fails on
|
|
63
|
+
copy, with a body of at most 144 characters. App Review rejects prices and offers in the text, so the local check fails on
|
|
64
64
|
them first. `--submit` sends drafts to App Review.
|
|
65
65
|
|
|
66
66
|
```ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sprid/release",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "Build, sign and release mobile apps locally. Store copy, screenshots, binary uploads and review submissions from one app-owned configuration. Dry run by default.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
package/src/asc/index.ts
CHANGED
|
@@ -14,5 +14,5 @@ export { pushCustomProductPages, pushProductPageTest, readProductPageTest, planP
|
|
|
14
14
|
export type { PushPagesOptions, PushTestOptions, PushedPage, TestStatus, PagePlan, TestPlan } from './product-pages.ts';
|
|
15
15
|
export { readPageResults, printPageResults, resultsLabel, downloadsPerView, foldPages } from './page-results.ts';
|
|
16
16
|
export type { PageResults, PageResultsOptions, PageRow } from './page-results.ts';
|
|
17
|
-
export { pushRetentionMessages, planRetention, MAX_RETENTION_MESSAGES } from './retention.ts';
|
|
17
|
+
export { pushRetentionMessages, planRetention, MAX_RETENTION_MESSAGES, MAX_RETENTION_BODY } from './retention.ts';
|
|
18
18
|
export type { PushRetentionOptions, PushedRetentionMessage, PlannedRetentionMessage } from './retention.ts';
|
package/src/asc/retention.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Retention messages: the text Apple shows on the Confirm Cancellation page
|
|
3
3
|
* after a subscriber taps Cancel Subscription. One message per subscription,
|
|
4
4
|
* at most ten per app, localized for every storefront the subscription sells
|
|
5
|
-
* in.
|
|
6
|
-
* fails on
|
|
5
|
+
* in. The body takes at most 144 characters, and App Review rejects prices and
|
|
6
|
+
* offers in the text, so the local check fails on both before anything is sent.
|
|
7
7
|
*
|
|
8
8
|
* Each message has versions. An approved version cannot be edited: a change
|
|
9
9
|
* goes on a new draft version, the approved one stays live until the draft is
|
|
@@ -17,6 +17,8 @@ import { listAll } from './product-pages.ts';
|
|
|
17
17
|
import { addToReview } from './submissions.ts';
|
|
18
18
|
|
|
19
19
|
export const MAX_RETENTION_MESSAGES = 10;
|
|
20
|
+
/** App Store Connect answers 409 above this; Apple's help pages do not state it. */
|
|
21
|
+
export const MAX_RETENTION_BODY = 144;
|
|
20
22
|
const EDITABLE = new Set(['PREPARE_FOR_SUBMISSION', 'READY_FOR_REVIEW', 'REJECTED', 'DEVELOPER_REJECTED']);
|
|
21
23
|
const IN_REVIEW = new Set(['WAITING_FOR_REVIEW', 'IN_REVIEW']);
|
|
22
24
|
|
|
@@ -55,6 +57,7 @@ export function planRetention(config: AppReleaseConfig, localeMap: Record<string
|
|
|
55
57
|
if (!c) { problems.push(`${where}: no copy for "${lang}". Apple wants every storefront locale.`); return { locale, header: '', body: '' }; }
|
|
56
58
|
const header = c.header?.trim() ?? '', body = c.body?.trim() ?? '';
|
|
57
59
|
if (!header || !body) problems.push(`${where}: header and body are both required.`);
|
|
60
|
+
if ([...body].length > MAX_RETENTION_BODY) problems.push(`${where} body: ${[...body].length} characters, Apple allows ${MAX_RETENTION_BODY}.`);
|
|
58
61
|
for (const [field, text] of [['header', header], ['body', body]] as const) {
|
|
59
62
|
if (PRICE.test(text)) problems.push(`${where} ${field}: mentions a price or percentage. App Review rejects that.`);
|
|
60
63
|
const offer = text.match(OFFER);
|
package/src/play/client.ts
CHANGED
|
@@ -29,8 +29,17 @@ export function createPlayClient(config: AppReleaseConfig): PlayClient {
|
|
|
29
29
|
|
|
30
30
|
// Retain the exported method name for existing callers. Listing updates never
|
|
31
31
|
// modify release tracks, even when Play refuses a commit for a draft app.
|
|
32
|
+
// Play refuses an automatic send for review while the app has rejected or
|
|
33
|
+
// pending changes; the edit then commits only with changesNotSentForReview and
|
|
34
|
+
// is sent for review from the Publishing overview in Play Console.
|
|
32
35
|
async function commitWithDraftStaging(editId: string, _reapply?: (editId: string) => Promise<void>): Promise<void> {
|
|
33
|
-
|
|
36
|
+
try {
|
|
37
|
+
await play.edits.commit({ packageName, editId });
|
|
38
|
+
} catch (e: any) {
|
|
39
|
+
if (!String(e?.message ?? '').includes('changesNotSentForReview')) throw e;
|
|
40
|
+
await play.edits.commit({ packageName, editId, changesNotSentForReview: true });
|
|
41
|
+
console.log(' Committed without sending for review. Send the changes from Publishing overview in Play Console.');
|
|
42
|
+
}
|
|
34
43
|
}
|
|
35
44
|
|
|
36
45
|
async function withEdit<T>(fn: (editId: string) => Promise<T>): Promise<T> {
|