
Security News
Security Community Slams MIT-linked Report Claiming AI Powers 80% of Ransomware
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.
@fluentui/codemods
Advanced tools
Tool enabling easy upgrades to Fluent UI React v8 version
If you have a typescript application or library that relies on a non-current version of Fluent UI then you can run npx @fluentui/codemods to immediately begin an upgrade of your codebase, saving you the trouble of doing so manually! This works by finding all the tsconfig files and then using those to find the relevant files to upgrade before running the updates on each of them!
If your application relies on any Fluent UI package simply run
npx @fluentui/codemods
and the upgrade will begin if there are any relevant codemods to apply to your codebase!
Run
yarn
yarn start-test
To start testing the codemods
Add your codemods to the ./src/mods folder with .mod.ts|tsx as the file type.
Run
yarn build
To build
Run
npm pack
from the codemods package root to create a tar file for testing. Move the created tar file to the package you want to test and run
npx <tarFileName>
-n Specify name(s) of codemod(s) to run. You can find these names in codemods/src/codemods/mods. Make sure that they are enabled before running them, or else they won't run!-r Specify regex pattern(s) to identify mod(s) to run.-e Boolean flag that flips the inclusion of the specify mods. Use this flag with the selective flags -n or -r to opt to exclude the selected mods rather than include them.-l List the names of all enabled codemods. Mods that exist but aren't enabled will not appear, as running them would do nothing.-c For developers who don't want to worry about the command line, they can create a modConfig.json file in their repo. The template for the file looks like this, where stringFilters and regexFilters would correspond to inputs following -n and -c, respectively:{
  "stringFilters": [],
  "regexFilters": [],
  "includeMods": true
}
enabled codeods.flag utility that will enable devs to note when a part of a file needs to be changed, but cannot be done via codemod.ts-morph:
SyntaxKind.block it is the equivalent of the { stuff } that is located in a function declaration and is where a lot of code lives.SyntaxKind.JSXOpeningElement and SyntaxKind.JSXSelfClosingElementgetChildIndex returns the child index respective to the immediate parent. It resets at each level. So consider the following:
     function foo() {
         const childIndex0 = "some other value";
         const childIndex1 = "some value";
         return childIndex2;
     }
     function foo() {
         const childIndex0 = "some other value";
         const childIndex1 = "some value";
         const nestedFunctionChildIndex2 = () => {
             const childIndex0; // childindex is now 0
         }
         return childIndex3
     }
FAQs
Tool enabling easy upgrades to Fluent UI React v8 version
We found that @fluentui/codemods demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 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.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.

Research
/Security News
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.