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

SDK-3306: Error class hierarchy #186

Merged
merged 10 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
19 changes: 18 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,22 @@ module.exports = {
parserOptions: {
project: "./tsconfig.eslint.json",
},
ignorePatterns: ["dist/"],
overrides: [
{
rules: {
// Conflicts with TS imports
"import/no-unresolved": "off",
"no-shadow": [
"error",
{
// status is a (deprecated) global variable, but it also is the
// conventional name for a Response attribute.
allow: ["status"],
},
],
},
files: "*",
},
],
ignorePatterns: ["dist/", "docs/"],
};
7 changes: 4 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ This PR bumps the version to <version number>.
1. Look at the [CHANGELOG.md](../CHANGELOG.md) to determine whether the release should be a major, minor, or patch release. Coordinate with the team to ensure the next version is agreed upon.
2. Run `npm version -- <major|minor|patch> --no-push` with the decided on version (to prevent the tag from being pushed).
3. Update the `CHANGELOG.md` to release the latest the version, and set the release date.
4. Commit the changes on a `release/vX.Y.Z` branch
5. Push to GitHub, create a PR, and merge once CI passes.
6. Create a release on GitHub for the new version, using a combination of the release notes from the `CHANGELOG.md` and the automatically generated changes.
4. Add the `@since X.Y.Z` annotations to new APIs.
5. Commit the changes on a `release/vX.Y.Z` branch
6. Push to GitHub, create a PR, and merge once CI passes.
7. Create a release on GitHub for the new version, using a combination of the release notes from the `CHANGELOG.md` and the automatically generated changes.
The release should have a new tag matching the new version number: `vx.y.z`, and point to the release commit.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,5 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

docs/api/source/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ releases](https://nodejs.org/en/about/releases/), and support 18.x and 20.x.

# Installation

For the latest stable version of solid-client-error:
For the latest stable version of solid-client-errors:

```bash
npm install @inrupt/solid-client-errors
Expand Down
3 changes: 3 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ import type { Config } from "jest";
type ArrayElement<MyArray> = MyArray extends Array<infer T> ? T : never;

const baseConfig: ArrayElement<NonNullable<Config["projects"]>> = {
coveragePathIgnorePatterns: [".*\\.mock\\.ts"],
modulePathIgnorePatterns: ["dist/", "<rootDir>/examples/"],
// Setup required because of missing globals in JSDom
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
testRegex: "/src/.*\\.test\\.ts$",
clearMocks: true,
injectGlobals: false,
Expand Down
22 changes: 22 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// Copyright Inrupt Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
// Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

import "@inrupt/jest-jsdom-polyfills";
Loading