Skip to content

Chore: Add an ignore-previously-published arg to the publish action#8023

Merged
etrepum merged 5 commits intomainfrom
ignore-previously-published
Dec 10, 2025
Merged

Chore: Add an ignore-previously-published arg to the publish action#8023
etrepum merged 5 commits intomainfrom
ignore-previously-published

Conversation

@etrepum
Copy link
Copy Markdown
Collaborator

@etrepum etrepum commented Dec 10, 2025

Description

Occasionally npm publish will publish a package but still give us an already published error for no clear reason. This should give us a way to retry the action and ignore that specific error.

Closes #8022 (rolled up into this PR)

Test plan

Before

https://github.com/facebook/lexical/actions/runs/20112064517/job/57711802858

Publishing @lexical/rich-text...
/home/runner/work/lexical/lexical/node_modules/child-process-promise/lib/index.js:33
            var cpError = new ChildProcessError(err.message, err.code, child_process, stdout, stderr);
                          ^
ChildProcessError: Command failed: cd ./packages/lexical-rich-text/npm && npm publish --access public --tag latest
npm warn publish npm auto-corrected some errors in your package.json when publishing.  Please run "npm pkg fix" to address these errors.
npm warn publish errors corrected:
npm warn publish "repository.url" was normalized to "git+https://github.com/facebook/lexical.git"
npm notice
npm notice 📦  @lexical/rich-text@0.39.0
npm notice Tarball Contents
npm notice 29.3kB LexicalRichText.dev.js
npm notice 28.9kB LexicalRichText.dev.mjs
npm notice 381B LexicalRichText.js
npm notice 2.1kB LexicalRichText.js.flow
npm notice 868B LexicalRichText.mjs
npm notice 826B LexicalRichText.node.mjs
npm notice 13.6kB LexicalRichText.prod.js
npm notice 11.7kB LexicalRichText.prod.mjs
npm notice 1.1kB LICENSE
npm notice 687B README.md
npm notice 3.1kB index.d.ts
npm notice 1.2kB package.json
npm notice Tarball Details
npm notice name: @lexical/rich-text
npm notice version: 0.39.0
npm notice filename: lexical-rich-text-0.39.0.tgz
npm notice package size: 19.1 kB
npm notice unpacked size: 93.7 kB
npm notice shasum: f0fb7a4e2252278e0879c214d22c102bd0cd0512
npm notice integrity: sha512-UoSgRi09nLP/m[...]pf4gBpgPPqWBw==
npm notice total files: 12
npm notice
npm notice Publishing to https://registry.npmjs.org/ with tag latest and public access
npm error code E403
npm error 403 403 Forbidden - PUT https://registry.npmjs.org/@lexical%2frich-text - You cannot publish over the previously published versions: 0.39.0.
npm error 403 In most cases, you or one of your dependencies are requesting
npm error 403 a package version that is forbidden by your security policy, or
npm error 403 on a server you do not have access to.
npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2025-12-10T20_20_06_637Z-debug-0.log
 `cd ./packages/lexical-rich-text/npm && npm publish --access public --tag latest` (exited with error code 1)
    at callback (/home/runner/work/lexical/lexical/node_modules/child-process-promise/lib/index.js:33:27)
    at ChildProcess.exithandler (node:child_process:430:5)
    at ChildProcess.emit (node:events:524:28)
    at maybeClose (node:internal/child_process:1104:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5) {
  code: 1,
  childProcess: {
    _forkChild: [Function: _forkChild],
    ChildProcess: [Function: ChildProcess],
    exec: [Function: exec],
    execFile: [Function: execFile],
    execFileSync: [Function: execFileSync],
    execSync: [Function: execSync],
    fork: [Function: fork],
    spawn: [Function: spawn],
    spawnSync: [Function: spawnSync]
  },
  stdout: '',
  stderr: 'npm warn publish npm auto-corrected some errors in your package.json when publishing.  Please run "npm pkg fix" to address these errors.\n' +
    'npm warn publish errors corrected:\n' +
    'npm warn publish "repository.url" was normalized to "git+https://github.com/facebook/lexical.git"\n' +
    'npm notice\n' +
    'npm notice 📦  @lexical/rich-text@0.39.0\n' +
    'npm notice Tarball Contents\n' +
    'npm notice 29.3kB LexicalRichText.dev.js\n' +
    'npm notice 28.9kB LexicalRichText.dev.mjs\n' +
    'npm notice 381B LexicalRichText.js\n' +
    'npm notice 2.1kB LexicalRichText.js.flow\n' +
    'npm notice 868B LexicalRichText.mjs\n' +
    'npm notice 826B LexicalRichText.node.mjs\n' +
    'npm notice 13.6kB LexicalRichText.prod.js\n' +
    'npm notice 11.7kB LexicalRichText.prod.mjs\n' +
    'npm notice 1.1kB LICENSE\n' +
    'npm notice 687B README.md\n' +
    'npm notice 3.1kB index.d.ts\n' +
    'npm notice 1.2kB package.json\n' +
    'npm notice Tarball Details\n' +
    'npm notice name: @lexical/rich-text\n' +
    'npm notice version: 0.39.0\n' +
    'npm notice filename: lexical-rich-text-0.39.0.tgz\n' +
    'npm notice package size: 19.1 kB\n' +
    'npm notice unpacked size: 93.7 kB\n' +
    'npm notice shasum: f0fb7a4e2252278e0879c214d22c102bd0cd0512\n' +
    'npm notice integrity: sha512-UoSgRi09nLP/m[...]pf4gBpgPPqWBw==\n' +
    'npm notice total files: 12\n' +
    'npm notice\n' +
    'npm notice Publishing to https://registry.npmjs.org/ with tag latest and public access\n' +
    'npm error code E403\n' +
    'npm error 403 403 Forbidden - PUT https://registry.npmjs.org/@lexical%2frich-text - You cannot publish over the previously published versions: 0.39.0.\n' +
    'npm error 403 In most cases, you or one of your dependencies are requesting\n' +
    'npm error 403 a package version that is forbidden by your security policy, or\n' +
    'npm error 403 on a server you do not have access to.\n' +
    'npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2025-12-10T20_20_06_637Z-debug-0.log\n'
}
Node.js v20.19.6

@vercel
Copy link
Copy Markdown

vercel bot commented Dec 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
lexical Ready Ready Preview Comment Dec 10, 2025 9:51pm
lexical-playground Ready Ready Preview Comment Dec 10, 2025 9:51pm

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 10, 2025
ivailop7
ivailop7 previously approved these changes Dec 10, 2025
@etrepum etrepum changed the title Add an ignore-previously-published arg to the publish action Chore: Add an ignore-previously-published arg to the publish action Dec 10, 2025
@etrepum etrepum added this pull request to the merge queue Dec 10, 2025
Merged via the queue into main with commit f508ff5 Dec 10, 2025
39 checks passed
@etrepum etrepum deleted the ignore-previously-published branch December 10, 2025 21:59
@zurfyx zurfyx mentioned this pull request Dec 22, 2025
@etrepum etrepum mentioned this pull request Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants