@api3/commons 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -43,12 +43,14 @@ import { createLogger } from '@api3/commons/logger';
43
43
 
44
44
  To release a new version follow these steps:
45
45
 
46
- 1. `git checkout main` - Always publish from `main` branch. Also, ensure that the working directory is clean (has no
47
- uncommitted changes).
46
+ 1. `git checkout main && git pull` - Always publish from up to date `main` branch. Also, ensure that the working
47
+ directory is clean (has no uncommitted changes).
48
48
  2. `pnpm version [major|minor|patch]` - Choose the right version bump. This will bump the version, create a git tag and
49
49
  commit it.
50
- 3. `pnpm publish --access public` - Publish the new version to NPM.
51
- 4. `git push --follow-tags` - Push the tagged commit upstream.
50
+ 3. `pnpm publish --access public` - Build the package and publish the new version to NPM.
51
+ 4. `git push --follow-tags` - Push the tagged commit upstream. If you don't have access to push directly to main branch,
52
+ create a separate branch and open a PR. This PR must be merged using the "Rebase and merge" strategy to preserve the
53
+ git tag.
52
54
  5. Create a new [release on GitHub](https://github.com/api3dao/commons/releases). Use the "Generate release notes"
53
55
  feature to generate the release notes from the PR titles.
54
56
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@api3/commons",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "keywords": [],
5
5
  "license": "MIT",
6
6
  "engines": {
7
- "node": "^18.14.0",
7
+ "node": "^18.14.0 || ^20.10.0",
8
8
  "pnpm": "^8.8.0"
9
9
  },
10
10
  "files": [
@@ -58,7 +58,7 @@ describe(preProcessEndpointParametersV1.name, () => {
58
58
 
59
59
  const throwingFunc = async () => preProcessEndpointParametersV1(preProcessingSpecifications, parameters);
60
60
 
61
- await expect(throwingFunc).rejects.toEqual(new Error('SyntaxError: Unexpected identifier'));
61
+ await expect(throwingFunc).rejects.toThrow('SyntaxError: Unexpected identifier');
62
62
  });
63
63
 
64
64
  it('demonstrates access to endpointParameters, but reserved parameters are inaccessible', async () => {
@@ -192,7 +192,7 @@ describe(postProcessResponseV1.name, () => {
192
192
 
193
193
  const throwingFunc = async () => postProcessResponseV1({ price: 1000 }, postProcessingSpecifications, parameters);
194
194
 
195
- await expect(throwingFunc).rejects.toEqual(new Error('SyntaxError: Unexpected identifier'));
195
+ await expect(throwingFunc).rejects.toThrow('SyntaxError: Unexpected identifier');
196
196
  });
197
197
  });
198
198
 
@@ -298,7 +298,7 @@ describe(preProcessEndpointParametersV2.name, () => {
298
298
 
299
299
  const throwingFunc = async () => preProcessEndpointParametersV2(preProcessingSpecificationV2, parameters);
300
300
 
301
- await expect(throwingFunc).rejects.toEqual(new Error('SyntaxError: Unexpected identifier'));
301
+ await expect(throwingFunc).rejects.toThrow('SyntaxError: Unexpected identifier');
302
302
  });
303
303
 
304
304
  it('reserved parameters are inaccessible', async () => {
@@ -454,7 +454,7 @@ describe(postProcessResponseV2.name, () => {
454
454
  const throwingFunc = async () =>
455
455
  postProcessResponseV2({ price: 1000 }, postProcessingSpecificationV2, parameters);
456
456
 
457
- await expect(throwingFunc).rejects.toEqual(new Error('SyntaxError: Unexpected identifier'));
457
+ await expect(throwingFunc).rejects.toThrow('SyntaxError: Unexpected identifier');
458
458
  });
459
459
  });
460
460