Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@ferlab/ui
Advanced tools
npm i @ferlab/ui
Steps to develop or debug the libraries in a real project
npm link
inside @ferlab/ui foldernpm link @ferlab/ui
Linking the library will add the packages twice in the bundle, which could create some issues with react
and react-dom
. It's important to add an alias to use the host modules.
e.g. in tsconfig | please refer to clin-portal-ui for a working example.
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"react": ["node_modules/react"],
"react-dom": ["node_modules/react-dom"]
}
}
}
Other solution:
npm link the project node_modules/react into ferlab/ui
This problem can also come up when you use npm link or an equivalent. In that case, your bundler might “see” two Reacts — one in application folder and one in your library folder. Assuming myapp and mylib are sibling folders, one possible fix is to run npm link ../myapp/node_modules/react
from mylib. This should make the library use the application’s React copy.
In order to see and test all available components
First you need to build the components
npm run build
or run in development mode
npm start
cd ferlab-ui/storybook
npm start
antd sometimes has breaking changes in non-breaking realease. To reduce the risk of blocking development in multiple project. We should follow the steps to update anything related to ant design.
Clin has feature branch QA environnement, no need to release in QA.
Release.md
file with the changesDescription: This section outlines the process of publishing a package to npm. The publication is automatically triggered when a branch is merged into the master
branch. If the package version already exists, the publish process will be skipped to avoid conflicts.
Steps:
package.json
version to the desired version for the release. master
branch. Description: The purpose of a Release Candidate (RC) is to thoroughly test changes before merging them into the main branch. It allows specific changes to be tested in a feature branch before becoming part of the official release.
Steps:
package.json
version with a suffix -rc[number]
, such as 8.5.6-rc2
, to indicate that it is a Release Candidate. master
branch. master
branch. Its purpose is to ensure thorough testing before proceeding with the official release. Try to install the package to make sure everything work corretly
cd [test dir] && npm i [full_path]/ferlab-ui/packages/ui
Delete core folder to remove deleted files
rm -rf core/
Prepare the package
npm run build
Push the new version
Create a tag to the new version git tag ui@[semantic version]
e.g.
git tag ui@4.4.1 git push --tags
Login to npm
npm login
Push the new version
npm publish
Run npx tscp -w
to live-watch sass file.
Naming convention for colors variables should follow ant design theme implementation
[project]
|-- theme/ :> Legacy styles
|-- style/ :> Main style/theme source
|-- dist/ :> dynamicaly generated files
|-- themes
|-- default/ :> default theme, to load in code
|-- antd.css :> load in main app, rewrite ant design default
'-- _colors.scss :> dynamically generated colors from ant design theme in colors.less
|-- themes/
|-- default :> default theme (default could for example point to v1 or v2 etc.)
|-- antd/ :> not use directly in the code
| |-- antd.less
| '-- colors.less
|-- _colors.scss :> Ant design colors to import from other scss files or JavaScript
|-- colors.modules.scss :> Colors classes and variables to be uses inside jsx (className)
'-- main.scss :> General style for the site outside ant design component
everything in legacy src/theme/
should go in src/style/theme/default/main.scss
or src/style/theme/default/colors.scss
Ant Design available theme variables
First import ant design override in the main application file
import 'themes/dist/themes/default/antd.css';
import 'themes/default/main.scss';
[Component].module.scss
file in the same directoryimport style from '[Component].module.css'
// ...
return () => <div clasName={style.isBeautiful}></div>;
src/themes/default/colors.scss
or src/themes/default/main.scss
inside a scss file, use the export key
to make them available to JavaScript. Use the same technique as component .module.scss
import in JS.
e.g.
:export {
btnPrimaryBg: $btn-primary-bg;
btnPrimaryColor: $btn-primary-color;
}
Link Issues:
In packages/ui:
rm -rf core
npm i
npm run build
npm remove --global @ferlab/ui
npm link
npm link ~/[project path]/nodes-module/react
Then in local projet:
npm unlink @ferlab/ui
npm link @ferlab/ui
npm start
FAQs
Core components for scientific research data portals
The npm package @ferlab/ui receives a total of 186 weekly downloads. As such, @ferlab/ui popularity was classified as not popular.
We found that @ferlab/ui demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.