apify-test-tools 0.10.0 → 0.10.1-beta.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.
|
@@ -16,6 +16,13 @@ on:
|
|
|
16
16
|
description: Commit to move the tag to. Defaults to the commit that triggered the caller.
|
|
17
17
|
type: string
|
|
18
18
|
default: ''
|
|
19
|
+
wait_for_publish:
|
|
20
|
+
description: >-
|
|
21
|
+
Set by a release that has just published the pinned version. npm accepts a publish
|
|
22
|
+
before the version is readable, so the check waits instead of treating the gap as
|
|
23
|
+
a held tag, and fails if the version never appears.
|
|
24
|
+
type: boolean
|
|
25
|
+
default: false
|
|
19
26
|
|
|
20
27
|
permissions:
|
|
21
28
|
contents: read
|
|
@@ -58,23 +65,50 @@ jobs:
|
|
|
58
65
|
|
|
59
66
|
- name: Check the required package version is published
|
|
60
67
|
id: check
|
|
68
|
+
env:
|
|
69
|
+
# npm accepts a publish and processes it asynchronously ("Your package is being
|
|
70
|
+
# processed and may take a few minutes to become available"). Observed at ~19
|
|
71
|
+
# minutes for a provenance-signed release, so the release path waits well past
|
|
72
|
+
# npm's own estimate rather than shipping a tag consumers cannot install against.
|
|
73
|
+
WAIT_SECONDS: ${{ inputs.wait_for_publish && 2400 || 0 }}
|
|
61
74
|
run: |
|
|
62
75
|
pinned_version=$(cat .github/workflows-package-version)
|
|
63
76
|
echo "pinned_version=$pinned_version" >> "$GITHUB_OUTPUT"
|
|
64
77
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
78
|
+
deadline=$(( $(date +%s) + WAIT_SECONDS ))
|
|
79
|
+
while :; do
|
|
80
|
+
# --prefer-online so a 404 cached from an earlier attempt cannot outlive the
|
|
81
|
+
# publish it was polling for.
|
|
82
|
+
if output=$(npm view "apify-test-tools@$pinned_version" version --prefer-online 2>&1); then
|
|
69
83
|
echo "apify-test-tools@$pinned_version is on npm"
|
|
70
84
|
echo "published=true" >> "$GITHUB_OUTPUT"
|
|
71
85
|
exit 0
|
|
72
86
|
fi
|
|
73
|
-
|
|
74
|
-
|
|
87
|
+
|
|
88
|
+
# Anything that is not "this version does not exist" is a registry, network or
|
|
89
|
+
# auth problem. Sitting in the retry loop would hide it behind a held tag.
|
|
90
|
+
if ! grep -q 'code E404' <<< "$output"; then
|
|
91
|
+
echo "::error::npm view failed for a reason other than the version being absent."
|
|
92
|
+
echo "$output"
|
|
93
|
+
exit 1
|
|
94
|
+
fi
|
|
95
|
+
|
|
96
|
+
if [ "$(date +%s)" -ge "$deadline" ]; then
|
|
97
|
+
break
|
|
98
|
+
fi
|
|
99
|
+
echo "apify-test-tools@$pinned_version is not on npm yet, retrying in 30s"
|
|
100
|
+
sleep 30
|
|
75
101
|
done
|
|
102
|
+
|
|
76
103
|
echo "published=false" >> "$GITHUB_OUTPUT"
|
|
77
104
|
|
|
105
|
+
# A release waited for its own publish and never saw it. That is a broken release,
|
|
106
|
+
# not a held tag, and it has to be red so it can be re-run once npm catches up.
|
|
107
|
+
if [ "$WAIT_SECONDS" -gt 0 ]; then
|
|
108
|
+
echo "::error::apify-test-tools@$pinned_version was published by this run but is still not readable after $((WAIT_SECONDS / 60))m. Re-run this job once it appears on npm."
|
|
109
|
+
exit 1
|
|
110
|
+
fi
|
|
111
|
+
|
|
78
112
|
- name: Move tag
|
|
79
113
|
if: steps.check.outputs.published == 'true'
|
|
80
114
|
env:
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
<!-- git-cliff-unreleased-start -->
|
|
6
|
+
## 0.10.1 - **not yet released**
|
|
7
|
+
|
|
8
|
+
### 🐛 Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **internal-workflows:** Wait out npm's async publish before holding the major tag ([#160](https://github.com/apify/apify-test-tools/pull/160)) ([78434f0](https://github.com/apify/apify-test-tools/commit/78434f03d288ecbd383d55d56a1610f06ded298f)) by [@metalwarrior665](https://github.com/metalwarrior665)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
<!-- git-cliff-unreleased-end -->
|
|
5
14
|
## [0.10.0](https://github.com/apify/apify-test-tools/releases/tag/v0.10.0) (2026-09-30)
|
|
6
15
|
|
|
7
16
|
### 🚀 Features
|
package/package.json
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
2
|
+
"name": "apify-test-tools",
|
|
3
|
+
"version": "0.10.1-beta.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "TBD",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/apify/apify-test-tools.git"
|
|
9
|
+
},
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=18.0.0"
|
|
12
|
+
},
|
|
13
|
+
"bin": {
|
|
14
|
+
"apify-test-tools": "dist/bin/main.js"
|
|
15
|
+
},
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"main": "./dist/lib/lib.js",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@apify/consts": "^2.43.0",
|
|
20
|
+
"@slack/web-api": "^7.9.2",
|
|
21
|
+
"adm-zip": "^0.6.1",
|
|
22
|
+
"apify-client": "^2.22.2",
|
|
23
|
+
"ignore": "^7.0.5",
|
|
24
|
+
"yargs": "^18.0.0",
|
|
25
|
+
"zod": "^4.6.5"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@apify/eslint-config": "^1.0.0",
|
|
29
|
+
"@apify/tsconfig": "^0.1.1",
|
|
30
|
+
"@types/adm-zip": "^0.5.8",
|
|
31
|
+
"@types/node": "^24.0.0",
|
|
32
|
+
"@types/yargs": "^17.0.33",
|
|
33
|
+
"eslint": "^9.29.0",
|
|
34
|
+
"eslint-config-prettier": "^10.1.5",
|
|
35
|
+
"globals": "^17.0.0",
|
|
36
|
+
"husky": "^9.0.11",
|
|
37
|
+
"knip": "^5.65.0",
|
|
38
|
+
"lint-staged": "^15.2.2",
|
|
39
|
+
"prettier": "^3.5.3",
|
|
40
|
+
"tsx": "^4.20.3",
|
|
41
|
+
"typescript": "^5.9.3",
|
|
42
|
+
"typescript-eslint": "^8.34.1",
|
|
43
|
+
"vitest": "^3.2.4"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"vitest": ">=3.2.4"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"start": "npm run dist/bin/main.js",
|
|
50
|
+
"start:dev": "tsx bin/main.ts --workspace local-clone",
|
|
51
|
+
"build": "tsc && chmod +x ./dist/bin/main.js",
|
|
52
|
+
"lint": "eslint",
|
|
53
|
+
"lint:fix": "eslint --fix",
|
|
54
|
+
"format": "prettier --write .",
|
|
55
|
+
"format:check": "prettier --check .",
|
|
56
|
+
"type-check": "tsc --noEmit",
|
|
57
|
+
"test": "vitest run",
|
|
58
|
+
"check-unused": "npx knip",
|
|
59
|
+
"prepare": "husky .husky || true"
|
|
60
|
+
},
|
|
61
|
+
"lint-staged": {
|
|
62
|
+
"*.js": "eslint",
|
|
63
|
+
"*.ts": "eslint"
|
|
64
|
+
},
|
|
65
|
+
"author": "oklinov",
|
|
66
|
+
"license": "ISC"
|
|
67
67
|
}
|