Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@bepo65/dayjs-demo-submodule
Advanced tools
Minimal package to show what happens, when package using dayjs uses different plugin configuration than program that uses this package (See dayjs issue #1577 for the corresponding question).
npm install @bepo65/dayjs-demo-submodule
and then in the test program
import dayjs from 'dayjs';
import updateLocale from 'dayjs/plugin/updateLocale.js';
import relativeTime from 'dayjs/plugin/relativeTime.js';
import { formatNow } from '@bepo65/dayjs-demo-submodule';
dayjs.extend(relativeTime);
dayjs.extend(updateLocale);
// update locale
dayjs.updateLocale('en', {
relativeTime: {
future: 'in %s',
past: '%s ago',
s: 'a few modified seconds',
m: '1 minute',
mm: '%d modified minutes',
h: '1 hour',
hh: '%d modified hours',
d: '1 day',
dd: '%d days',
M: 'a month',
MM: '%d months',
y: 'a year',
yy: '%d years'
}
});
console.log(`dayjs in this program gets '${dayjs(new Date()).fromNow()}' from dayjs.fromNow()`);
console.log(`dayjs in the imported package gets '${formatNow()}' from the formatNow`);
The test programm will show twice a few seconds ago
.
FAQs
A simple node module with dayjs
The npm package @bepo65/dayjs-demo-submodule receives a total of 1 weekly downloads. As such, @bepo65/dayjs-demo-submodule popularity was classified as not popular.
We found that @bepo65/dayjs-demo-submodule demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.