Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const {getGlobals} = require('eslint-plugin-mdx')

module.exports = {
root: true,
ignorePatterns: ['.cache/', 'public/'],
Expand Down Expand Up @@ -40,13 +38,25 @@ module.exports = {
parserOptions: {
sourceType: 'module',
},
globals: getGlobals(['Index', 'Note', 'Prompt', 'Screenshot', 'Link', 'YouTube']),
globals: {
Index: 'readonly',
Note: 'readonly',
Prompt: 'readonly',
Screenshot: 'readonly',
Link: 'readonly',
YouTube: 'readonly',
DataTable: 'readonly',
InlineCode: 'readonly',
Strikethrough: 'readonly',
CliLink: 'readonly',
},
settings: {
'import/resolver': 'webpack',
},
rules: {
'no-irregular-whitespace': 'off',
'react/no-unescaped-entities': 'off',
'react/jsx-key': 'off',
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,45 +39,42 @@ Two-factor authentication on npm can be enabled for authorization and writes, or

By default, 2FA is enabled for authorization and writes. We will request a second form of authentication for certain authorized actions, as well as write actions.

| Action | CLI command |
| :------------------------------------------------ | :----------------------------------------------------- |
| Log in to npm | [`npm login`][login] |
| Change profile settings (including your password) | [`npm profile set`][profile-set] |
| Change 2FA modes for your user account | [`npm profile enable-2fa auth-and-writes`][2fa-enable] |
| Disable 2FA for your user account | [`npm profile disable-2fa`][2fa-disable] |
| Create tokens | [`npm token create`][token-create] |
| Revoke tokens | [`npm token revoke`][token-revoke] |
| Publish packages | [`npm publish`][publish] |
| Unpublish packages | [`npm unpublish`][unpublish] |
| Deprecate packages | [`npm deprecate`][deprecate] |
| Change package visibility | [`npm access public/restricted`][access] |
| Change user and team package access | [`npm access grant/revoke`][access] |
| [Change package 2FA requirements][pkg-2fa] | [`npm access 2fa-required/2fa-not-required`][access] |
<DataTable
headers={["Action", "CLI command"]}
align={["l", "l"]}
rows={[
["Log in to npm", <Link key="login" href="https://docs.npmjs.com/cli/adduser"><InlineCode>npm login</InlineCode></Link>],
["Change profile settings (including your password)", <Link key="profile-set" href="https://docs.npmjs.com/cli/profile"><InlineCode>npm profile set</InlineCode></Link>],
["Change 2FA modes for your user account", <Link key="2fa-enable" href="https://docs.npmjs.com/cli/profile"><InlineCode>npm profile enable-2fa auth-and-writes</InlineCode></Link>],
["Disable 2FA for your user account", <Link key="2fa-disable" href="https://docs.npmjs.com/cli/profile"><InlineCode>npm profile disable-2fa</InlineCode></Link>],
["Create tokens", <Link key="token-create" href="https://docs.npmjs.com/cli/token"><InlineCode>npm token create</InlineCode></Link>],
["Revoke tokens", <Link key="token-revoke" href="https://docs.npmjs.com/cli/token"><InlineCode>npm token revoke</InlineCode></Link>],
["Publish packages", <Link key="publish" href="https://docs.npmjs.com/cli/publish"><InlineCode>npm publish</InlineCode></Link>],
["Unpublish packages", <Link key="unpublish" href="https://docs.npmjs.com/cli/unpublish"><InlineCode>npm unpublish</InlineCode></Link>],
["Deprecate packages", <Link key="deprecate" href="https://docs.npmjs.com/cli/deprecate"><InlineCode>npm deprecate</InlineCode></Link>],
["Change package visibility", <Link key="access-visibility" href="https://docs.npmjs.com/cli/access"><InlineCode>npm access public/restricted</InlineCode></Link>],
["Change user and team package access", <Link key="access-grant" href="https://docs.npmjs.com/cli/access"><InlineCode>npm access grant/revoke</InlineCode></Link>],
[<Link key="pkg-2fa" href="/requiring-2fa-for-package-publishing-and-settings-modification">Change package 2FA requirements</Link>, <Link key="access-2fa" href="https://docs.npmjs.com/cli/access"><InlineCode>npm access 2fa-required/2fa-not-required</InlineCode></Link>]
]}
/>

### Authorization only

If you enable 2FA for authorization only. We will request a second form of authentication only for certain authorized actions.

| Action | CLI command |
| :------------------------------------------------ | :----------------------------------------------- |
| Log in to npm | [`npm login`][login] |
| Change profile settings (including your password) | [`npm profile set`][profile-set] |
| Change 2FA modes for your user account | [`npm profile enable-2fa auth-only`][2fa-enable] |
| Disable 2FA for your user account | [`npm profile disable-2fa`][2fa-disable] |
| Create tokens | [`npm token create`][token-create] |
| Revoke tokens | [`npm token revoke`][token-revoke] |

[login]: https://docs.npmjs.com/cli/adduser
[profile-set]: https://docs.npmjs.com/cli/profile
[2fa-enable]: https://docs.npmjs.com/cli/profile
[2fa-disable]: https://docs.npmjs.com/cli/profile
[token-create]: https://docs.npmjs.com/cli/token
[token-revoke]: https://docs.npmjs.com/cli/token
[publish]: https://docs.npmjs.com/cli/publish
[unpublish]: https://docs.npmjs.com/cli/unpublish
[deprecate]: https://docs.npmjs.com/cli/deprecate
[access]: https://docs.npmjs.com/cli/access
[pkg-2fa]: /requiring-2fa-for-package-publishing-and-settings-modification
<DataTable
headers={["Action", "CLI command"]}
align={["l", "l"]}
rows={[
["Log in to npm", <Link key="login" href="https://docs.npmjs.com/cli/adduser"><InlineCode>npm login</InlineCode></Link>],
["Change profile settings (including your password)", <Link key="profile-set" href="https://docs.npmjs.com/cli/profile"><InlineCode>npm profile set</InlineCode></Link>],
["Change 2FA modes for your user account", <Link key="2fa-enable" href="https://docs.npmjs.com/cli/profile"><InlineCode>npm profile enable-2fa auth-only</InlineCode></Link>],
["Disable 2FA for your user account", <Link key="2fa-disable" href="https://docs.npmjs.com/cli/profile"><InlineCode>npm profile disable-2fa</InlineCode></Link>],
["Create tokens", <Link key="token-create" href="https://docs.npmjs.com/cli/token"><InlineCode>npm token create</InlineCode></Link>],
["Revoke tokens", <Link key="token-revoke" href="https://docs.npmjs.com/cli/token"><InlineCode>npm token revoke</InlineCode></Link>]
]}
/>

[webauthn]: https://webauthn.guide/
[can-i-use]: https://caniuse.com/#search=webauthn
[u2f]: https://en.wikipedia.org/wiki/Universal_2nd_Factor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ npm is written to use resources efficiently on install, and part of this is that

## `cb() never called!` when using shrinkwrapped dependencies

Take a look at [issue #5920](https://github.com/npm/npm/issues/5920). ~~We're working on fixing this one, but it's a fairly subtle race condition and it's taking us a little time. You might try moving your `npm-shrinkwrap.json` file out of the way until we have this fixed.~~ This has been fixed in versions of npm newer than `[email protected]`, so update to `npm@latest`.
Take a look at [issue #5920](https://github.com/npm/npm/issues/5920). <Strikethrough>We're working on fixing this one, but it's a fairly subtle race condition and it's taking us a little time. You might try moving your `npm-shrinkwrap.json` file out of the way until we have this fixed.</Strikethrough> This has been fixed in versions of npm newer than `[email protected]`, so update to `npm@latest`.

## `npm login` errors

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,22 @@ There are three roles in an organization:

<><strong>On the public registry, you cannot remove the last owner from an organization.</strong> To delete an organization, {shared['contact-support'].text}.</>

| Action | **Owner** | **Admin** | **Member** |
| :---------------------------------------------------- | :-------: | :-------: | :--------: |
| Manage organization billing | X | | |
| Add members to the organization | X | | |
| Remove members from the organization | X | | |
| Rename an organization | X | | |
| Delete an organization | X | | |
| Change any organization member's role | X | | |
| Add org owned packages to other orgs | X | | |
| Create teams | X | X | |
| Delete teams | X | X | |
| Add any member to any team | X | X | |
| Remove any member from any team | X | X | |
| Manage team package access | X | X | |
| Create and publish packages in the organization scope | X | X | X |
<DataTable
headers={["Action", "Owner", "Admin", "Member"]}
align={["l", "c", "c", "c"]}
rows={[
["Manage organization billing", "X", "", ""],
["Add members to the organization", "X", "", ""],
["Remove members from the organization", "X", "", ""],
["Rename an organization", "X", "", ""],
["Delete an organization", "X", "", ""],
["Change any organization member's role", "X", "", ""],
["Add org owned packages to other orgs", "X", "", ""],
["Create teams", "X", "X", ""],
["Delete teams", "X", "X", ""],
["Add any member to any team", "X", "X", ""],
["Remove any member from any team", "X", "X", ""],
["Manage team package access", "X", "X", ""],
["Create and publish packages in the organization scope", "X", "X", "X"]
]}
/>
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ To keep the JavaScript ecosystem healthy, reliable, and secure, every time you m

To help developers who rely on your code, we recommend starting your package version at `1.0.0` and incrementing as follows:

| Code status | Stage | Rule | Example version |
| --- | --- | --- | --- |
| First release | New product | Start with 1.0.0 | 1.0.0 |
| Backward compatible bug fixes | Patch release | Increment the third digit | 1.0.1 |
| Backward compatible new features | Minor release | Increment the middle digit and reset last digit to zero | 1.1.0 |
| Changes that break backward compatibility | Major release | Increment the first digit and reset middle and last digits to zero | 2.0.0 |
<DataTable
headers={["Code status", "Stage", "Rule", "Example version"]}
rows={[
["First release", "New product", "Start with 1.0.0", "1.0.0"],
["Backward compatible bug fixes", "Patch release", "Increment the third digit", "1.0.1"],
["Backward compatible new features", "Minor release", "Increment the middle digit and reset last digit to zero", "1.1.0"],
["Changes that break backward compatibility", "Major release", "Increment the first digit and reset middle and last digits to zero", "2.0.0"]
]}
/>

## Using semantic versioning to specify update types your package can accept

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ Visibility of npm packages depends on the scope (namespace) in which the package

## npm Package Access Matrix

| Scope | Access level | Can view and download | Can write (publish) |
| --- | --- | --- | --- |
| Org | Private | Members of a team in the organization with read access to the package | Members of a team in the organization with read and write access to the package |
| Org | Public | Everyone | Members of a team in the organization with read and write access to the package |
| User | Private | The package owner and users who have been granted read access to the package | The package owner and users who have been granted read and write access to the package |
| User | Public | Everyone | The package owner and users who have been granted read and write access to the package |
| Unscoped | Public | Everyone | The package owner and users who have been granted read and write access to the package |
<DataTable
headers={["Scope", "Access level", "Can view and download", "Can write (publish)"]}
rows={[
["Org", "Private", "Members of a team in the organization with read access to the package", "Members of a team in the organization with read and write access to the package"],
["Org", "Public", "Everyone", "Members of a team in the organization with read and write access to the package"],
["User", "Private", "The package owner and users who have been granted read access to the package", "The package owner and users who have been granted read and write access to the package"],
["User", "Public", "Everyone", "The package owner and users who have been granted read and write access to the package"],
["Unscoped", "Public", "Everyone", "The package owner and users who have been granted read and write access to the package"]
]}
/>

<Note>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ Audit reports contain tables of information about security vulnerabilities in yo

The severity of the vulnerability, determined by the impact and exploitability of the vulnerability in its most common use case.

| Severity | Recommended action |
| :------- | :----------------------------- |
| Critical | Address immediately |
| High | Address as quickly as possible |
| Moderate | Address as time allows |
| Low | Address at your discretion |
<DataTable
headers={["Severity", "Recommended action"]}
align={["l", "l"]}
rows={[
["Critical", "Address immediately"],
["High", "Address as quickly as possible"],
["Moderate", "Address as time allows"],
["Low", "Address at your discretion"]
]}
/>

#### Description

Expand Down
3 changes: 1 addition & 2 deletions gatsby-config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import path from 'path'
import fs from 'fs'
import remarkGfm from 'remark-gfm'
import remarkFm from 'remark-frontmatter'

const {NODE_ENV, GATSBY_CONTENT_ALLOW, GATSBY_CONTENT_IGNORE, GATSBY_CONTENT_DIR = 'content'} = process.env
Expand Down Expand Up @@ -73,7 +72,7 @@ const config = {
resolve: 'gatsby-plugin-mdx',
options: {
mdxOptions: {
remarkPlugins: [remarkGfm, remarkFm],
remarkPlugins: [remarkFm],
},
},
},
Expand Down
Loading
Loading