
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
deprecation-crawler
Advanced tools
Do this by checking out the target project e.g. RxJS
git clone git@github.com:ReactiveX/rxjs.git rxjs`
cd rxjs
npx deprecation-crawler
Possible CLI params are:
deprecation-crawler.config.json
.
Pro Tip: use ./GIT_IGNORED_FOLDER/deprecation-crawler.config.json
for a 'dry-run'.CLI Questions
The command will ask you a couple of questions regarding the included file locations and defaults
to run the crawling and grouping process. It also includes helpful information.
tsconfig
(one-time)./tsconfig.json
is set as tscinfig to extend from. These locations should represent the projects ts config settings used to determine the folders to crawl.
Pro Tip: The result is stored in deprecation-crawler.tsconfig.json
go there to edit included files.√ What's the output directory?
By default ./depercations
is set. This will put the resulting data into the named folder.
Pro Tip: Move it in a gitignored folder for a 'dry-run'.
√ What's the deprecation keyword to look for?
By default @deprecated
is set. Looks for comments with this keyword to add to the deprecations list.
√ What's the deprecation link to the docs (the deprecation ruid will be appended to this)?
By default https://rxjs.dev/deprecations
is set. Used to add a link in the sourcecode to this location.
If a deprecation comment already has this link, it will be skipped.
After that, the process should start crawling and every crawled file should get logged to the console.
Looking for deprecations in path/to/file
main
is set.
Pro Tip: Pass the tag name as cli param to save repetitive questions (npx deprecation-crawler --tag main)For all crawled deprecations ruis get generated.
config#defaultCommitMessage
After the crawling is done, a new message should show up in the console saying
Adding grouping to deprecations...
You will get asked 2 questions for every crawled deprecation:
√ Add group to deprecation path/to/file#LINE_NUMBER
The text of the deprecation message gets listed and you have to enter a string for the group name.
By default ungrouped
is suggested. These strings serve as a reverence to the group.
√ Add regexp to group This question asks for a regular expression used to check every new deprecation against it is to see if it matches the group's conditions/regexes. Every group can have multiple regular expressions to test a deprecation for.
The deprecation message as well as the passed reges string will get normalized
Examples for message The full deprecation message for {@link test} thingy!
:
The full deprecation message for {@link test} thingy!
full deprecation
Pro Tip: Use groups to:
If you just hit enter no regular expression gets saved.
This means that every deprecation gets its own ruid generated by created from its function signature. Doing this enables us to detect already crawled deprecations, malicious deprecations as well as a ruid across machines and codebases/repositories.
After the deprecations have been processed, the source code of the repository will be updated. A link to the deprecation info will be added at the end of the deprecation message.
There are currently 2 formatters built in:
Both are set as default in the setup step.
Check if the generated configs ended up in ./[config#outputPath]/raw-deprecations.json
.
And the crawled deprecations are present in the configured folder (by default in the ./deprecations
folder).
Pro Tip: edit the formatters under [config#formatters]
Run the command:
For npm:
npm run test
For yarn:
yarn test
This will:
For npm:
npm run build
For yarn:
yarn build
Copy path to the packed file:
Open the dist/packages/deprecation-crawler
folder and search for the index.js
file.
copy the absolute path to index.js
.
Navigate to the root of your target project
cd path/to/the/root/folder
npx path/to/deprecation-crawler/dist/index.js
FAQs
## Preconditions
We found that deprecation-crawler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.