Repository navigation
chore: remove the unused @chemaxon/marvinjs dependency - #115
Open
matthewberry wants to merge 1 commit into
Open
matthewberry wants to merge 1 commit into
matthewberry wants to merge 1 commit into
Conversation
The MarvinJS editor never rendered in this app (the structure input uses Ketcher, or the editor was registered but placed in no template), so the Chemaxon package, its angular.json asset/script/style entries, the Artifactory registry in .npmrc, the NPM_TOKEN workflow auth, the dev proxy entries, the compose file and the editor component are removed. Lockfile tarball URLs that went through the Chemaxon Artifactory proxy are repointed at registry.npmjs.org with their integrity hashes intact.
Collaborator
Author
|
Checked: on the branch, none of the workflow files, Findings:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why it is not needed
MarvinJsModulewas imported inapp.module.tsbut<app-marvin-js-editor>appears in no template, so the editor never rendered. The only things that consumed the package were theassets/styles/scriptsentries inangular.json(which copied the MarvinJS distribution intoassets/marvin-js/and bundledmarvinjslauncher.js,util.js,webservices.jsintoscripts.js) and theMarvinJsEditorComponentthat calledMarvinJSUtil.getEditoron an iframe pointing at/demo.html. That iframe URL was only proxied inproxy.conf.jsonforng serve; in the nginx image/demo.htmlfalls through toindex.html, so the editor could not have worked in a deployed container even where it was reachable.The fleet moved to Ketcher (served through the
/ketcherproxy) for the structure editor. This PR removes the leftover MarvinJS/Chemaxon plumbing so the repo no longer needs a Chemaxon license, theNPM_TOKENsecret, or the Chemaxon Artifactory registry.What changes
.github/workflows/docker.yml.npmrc(deleted)README.mdangular.jsondocker-compose.marvin.yaml(deleted)package-lock.jsonpackage.jsonproxy.conf.jsonsrc/app/app.module.tssrc/app/components/chemscraper/marvinjs/index.ts(deleted)src/app/components/chemscraper/marvinjs/marvinjs-editor.component.ts(deleted)src/app/components/chemscraper/marvinjs/marvinjs.d.ts(deleted)src/app/components/chemscraper/marvinjs/marvinjs.module.ts(deleted)package.json:@chemaxon/marvinjsremoved.package-lock.json: its entry removed, and 2resolvedURLs that pointed athub.chemaxon.com:443/artifactory/api/npm/npm/(the Artifactory proxy of npmjs, which the old.npmrchad made the default registry) repointed atregistry.npmjs.org. Tarballs andintegrityhashes are unchanged; Artifactory serves npmjs tarballs byte-for-byte, andnpm civerifies every hash.angular.json: the 12 MarvinJSassets/styles/scriptsentries (6 per configuration)..npmrc: Chemaxon registry lines removed (file deleted; nothing else was in it).Workflows: the
hub.chemaxon.comauth line and itsNPM_TOKENcomment. Where that line was the only thing creating$HOME/.npmrc, it is replaced bytouch $HOME/.npmrcso the Docker build secret mount still has a file.docker-compose.marvin.yaml, the MarvinJS backend entries inproxy.conf.json, the README's Chemaxon registry setup block.The MarvinJS editor component (
marvinjs/directory: editor component, module, type declarations) and itsMarvinJsModuleregistration inapp.module.ts, since it existed only to host the package.Verification
npm ci --userconfig /dev/null(no registry credentials at all) followed byng buildsucceeds locally on this branch (Angular 15, webpack builder): every repointed tarball downloaded from npmjs with its original integrity hash, and the production bundle builds without the MarvinJS scripts.grep -rl chemaxonover the repo (excludingnode_modules,dist,.git) is empty.After merge
The
NPM_TOKENrepository secret is no longer referenced by any workflow and can be deleted.