mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-12 16:10:30 +02:00
ci: Fix urlencoding in set-latest ci script (#28965)
This commit is contained in:
parent
9997203667
commit
af25a0e7eb
|
|
@ -9,8 +9,8 @@ const NPM_REGISTRY = 'https://registry.npmjs.org';
|
||||||
* @param {string} token
|
* @param {string} token
|
||||||
*/
|
*/
|
||||||
async function setDistTag(name, version, tag, token) {
|
async function setDistTag(name, version, tag, token) {
|
||||||
// Scoped package names need the slash encoded (e.g. @n8n/foo → @n8n%2ffoo)
|
// Scoped package names need both @ and / encoded (e.g. @n8n/foo → %40n8n%2ffoo)
|
||||||
const encodedName = name.replace('/', '%2f');
|
const encodedName = encodeURIComponent(name);
|
||||||
const url = `${NPM_REGISTRY}/-/package/${encodedName}/dist-tags/${tag}`;
|
const url = `${NPM_REGISTRY}/-/package/${encodedName}/dist-tags/${tag}`;
|
||||||
|
|
||||||
return fetch(url, {
|
return fetch(url, {
|
||||||
|
|
@ -33,6 +33,7 @@ async function setLatestForMonorepoPackages() {
|
||||||
|
|
||||||
const publishedPackages = packages //
|
const publishedPackages = packages //
|
||||||
.filter((pkg) => !pkg.private)
|
.filter((pkg) => !pkg.private)
|
||||||
|
.filter((pkg) => pkg.name.startsWith('@n8n/'))
|
||||||
.filter((pkg) => pkg.version);
|
.filter((pkg) => pkg.version);
|
||||||
|
|
||||||
const failures = [];
|
const failures = [];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user