Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename branch master to main #41

Merged
merged 6 commits into from
Feb 10, 2021
Merged
Show file tree
Hide file tree
Changes from 3 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
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Test
on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

jobs:
test:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ of support they may intend to provide. The [Node.js Package Maintenance Working
is working to propose [a spec](https://github.com/nodejs/package-maintenance/blob/HEAD/docs/PACKAGE-SUPPORT.md) to help package authors declare their intended support goals. This package provides
some tooling around working with the format proposed.

This repository is managed by the [Package Maintenance Working Group](https://github.com/nodejs/package-maintenance), see [Governance](https://github.com/nodejs/package-maintenance/blob/master/Governance.md).
This repository is managed by the [Package Maintenance Working Group](https://github.com/nodejs/package-maintenance), see [Governance](https://github.com/nodejs/package-maintenance/blob/HEAD/Governance.md).

## Command line usage

Expand Down
14 changes: 7 additions & 7 deletions doc/command-line-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ you can run the support tool using `npx @pkgjs/support`.

The support tool helps package consumers review and understand the
package support information provided by maintainers. See
[Package-support.md](https://github.com/nodejs/package-maintenance/blob/master/docs/PACKAGE-SUPPORT.md)
[Package-support.md](https://github.com/nodejs/package-maintenance/blob/HEAD/docs/PACKAGE-SUPPORT.md)
which documents the suggested best practice and the specific format of the
package support information.

Expand Down Expand Up @@ -97,7 +97,7 @@ npx @pkgjs/support show --canonical


```
@pkgjs/support(0.0.2) - https://github.com/pkgjs/support/blob/master/package-support.json
@pkgjs/support(0.0.2) - https://github.com/pkgjs/support/blob/HEAD/package-support.json
@npmcli/arborist(0.0.0) - unknown
@npmcli/installed-package-contents(1.0.5) - unknown
npm-bundled(1.1.1) - unknown
Expand All @@ -116,7 +116,7 @@ npx @pkgjs/support show --canonical
```

where the support info is listed as
`https://github.com/pkgjs/support/blob/master/package-support.json`
`https://github.com/pkgjs/support/blob/main/package-support.json`
Eomm marked this conversation as resolved.
Show resolved Hide resolved

The --canonical option does not automatically pull the remote information so that the
consumer can choose to find the locations without automatically triggering a number of
Expand Down Expand Up @@ -151,7 +151,7 @@ of the package, the tool will simply print the url from which the support inform
can be obtained versus displaying it. For example:

```
@pkgjs/support-show-local-escape-ok(0.0.1) - https://github.com/pkgjs/support/blob/master/my-support-info.json
@pkgjs/support-show-local-escape-ok(0.0.1) - https://github.com/pkgjs/support/blob/main/my-support-info.json
```

where the `support` entry was:
Expand All @@ -177,15 +177,15 @@ The `validate` command checks that both the information added to the package.jso
and the file containing the support info (package-support.json by default) is valid.


[Integration into package.json](https://github.com/nodejs/package-maintenance/blob/master/docs/PACKAGE-SUPPORT.md#integration-into-packagejson)
[Integration into package.json](https://github.com/nodejs/package-maintenance/blob/main/docs/PACKAGE-SUPPORT.md#integration-into-packagejson)
mhdawson marked this conversation as resolved.
Show resolved Hide resolved
explains the options for providing support info and what goes into the package.json for
each case.

`npx @pkgjs/support validate` is run from the directory that contains the package.json for the package.
Depending the how the `support` section in the package.json is configured validate will:

* validate the format of the `support` section in the package.json conforms to the
documentation in [Integration into package.json](https://github.com/nodejs/package-maintenance/blob/master/docs/PACKAGE-SUPPORT.md#integration-into-packagejson)
documentation in [Integration into package.json](https://github.com/nodejs/package-maintenance/blob/main/docs/PACKAGE-SUPPORT.md#integration-into-packagejson)
mhdawson marked this conversation as resolved.
Show resolved Hide resolved
* calculate the file which contains the support info
* if the file is available locally, use that data unless the `--canonical`
option was specified.
Expand All @@ -205,7 +205,7 @@ If the support information is not available locally or you have specified
`--canonical` without `--fetch` you'll see something like:

```shell
support info not resolved: https://github.com/pkgjs/support/blob/master/package-support.json
support info not resolved: https://github.com/pkgjs/support/blob/main/package-support.json
```

in this case the file is local to the package, but --canonical was specified. The same
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module.exports.validate = (obj, cli = false) => {

// extract the URL for the support info from the pkg info
module.exports.getRemoteSupportInfoUrl = (repository, supportPath) => {
const gitHubInitialPath = '/blob/master/';
const gitHubInitialPath = '/blob/HEAD/';

if (repository && (repository.type === 'git')) {
const directory = repository.directory || '';
Expand Down
2 changes: 1 addition & 1 deletion schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "https://raw.githubusercontent.com/pkgjs/support/master/schema.json",
"$id": "https://raw.githubusercontent.com/pkgjs/support/main/schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Package Support Information",

Expand Down
2 changes: 1 addition & 1 deletion support-element-schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "https://raw.githubusercontent.com/pkgjs/support/master/support-element-schema.json",
"$id": "https://raw.githubusercontent.com/pkgjs/support/main/support-element-schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Package Support Package.json element",

Expand Down
2 changes: 1 addition & 1 deletion test/cli/show-local-escape/expected
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@pkgjs/support-show-local-escape(0.0.1) - https://github.com/pkgjs/support/blob/master/my-support-info.json
@pkgjs/support-show-local-escape(0.0.1) - https://github.com/pkgjs/support/blob/HEAD/my-support-info.json
2 changes: 1 addition & 1 deletion test/cli/show-local-path2/expected
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@pkgjs/show-local-path2(0.0.1) - https://github.com/pkgjs/show-local-path2/blob/master/subdir/my-support-info.json
@pkgjs/show-local-path2(0.0.1) - https://github.com/pkgjs/show-local-path2/blob/HEAD/subdir/my-support-info.json
2 changes: 1 addition & 1 deletion test/cli/show-separate-repo-directory1/expected
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@pkgjs/support-separate-repo-directory1(0.0.1) - https://github.com/pkgjs/support-separate-repo-other/blob/master/subdir2/my-support-package.json
@pkgjs/support-separate-repo-directory1(0.0.1) - https://github.com/pkgjs/support-separate-repo-other/blob/HEAD/subdir2/my-support-package.json
2 changes: 1 addition & 1 deletion test/cli/show-separate-repo-directory2/expected
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@pkgjs/support-separate-repo-directory2(0.0.1) - https://github.com/pkgjs/support-separate-repo-other/blob/master/subdir2/package-support.json
@pkgjs/support-separate-repo-directory2(0.0.1) - https://github.com/pkgjs/support-separate-repo-other/blob/HEAD/subdir2/package-support.json
2 changes: 1 addition & 1 deletion test/cli/show-separate-repo-directory3/expected
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@pkgjs/support-separate-repo-directory3(0.0.1) - https://github.com/pkgjs/support-separate-repo-other/blob/master/subdir2/subdir1/my-support-package.json
@pkgjs/support-separate-repo-directory3(0.0.1) - https://github.com/pkgjs/support-separate-repo-other/blob/HEAD/subdir2/subdir1/my-support-package.json
2 changes: 1 addition & 1 deletion test/cli/show-separate-repo-fetch-missing/expected-errors
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@pkgjs/support-separate-repo(0.0.1) - failed to fetch - https://github.com/pkgjs/support/blob/master/examples/does-not-exist.json
@pkgjs/support-separate-repo(0.0.1) - failed to fetch - https://github.com/pkgjs/support/blob/HEAD/examples/does-not-exist.json
2 changes: 1 addition & 1 deletion test/cli/show-separate-repo-path1/expected
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@pkgjs/support-separate-repo-path1(0.0.1) - https://github.com/pkgjs/support-separate-repo-other/blob/master/my-support-package.json
@pkgjs/support-separate-repo-path1(0.0.1) - https://github.com/pkgjs/support-separate-repo-other/blob/HEAD/my-support-package.json
2 changes: 1 addition & 1 deletion test/cli/show-separate-repo-path2/expected
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@pkgjs/support-separate-repo-path2(0.0.1) - https://github.com/pkgjs/support-separate-repo-other/blob/master/subdir1/my-support-package.json
@pkgjs/support-separate-repo-path2(0.0.1) - https://github.com/pkgjs/support-separate-repo-other/blob/HEAD/subdir1/my-support-package.json
2 changes: 1 addition & 1 deletion test/cli/show-separate-repo/expected
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@pkgjs/support-separate-repo(0.0.1) - https://github.com/pkgjs/support-separate-repo-other/blob/master/package-support.json
@pkgjs/support-separate-repo(0.0.1) - https://github.com/pkgjs/support-separate-repo-other/blob/HEAD/package-support.json
2 changes: 1 addition & 1 deletion test/cli/validate-local-repository1/expected-errors
Original file line number Diff line number Diff line change
@@ -1 +1 @@
support info not resolved: https://github.com/pkgjs/support-separate-repo-other/blob/master/subdir2/my-support-package.json
support info not resolved: https://github.com/pkgjs/support-separate-repo-other/blob/HEAD/subdir2/my-support-package.json
2 changes: 1 addition & 1 deletion test/cli/validate-non-resolved/expected-errors
Original file line number Diff line number Diff line change
@@ -1 +1 @@
support info not resolved: https://github.com/pkgjs/support/blob/master/package-support.json
support info not resolved: https://github.com/pkgjs/support/blob/HEAD/package-support.json