bcchapi 1.0.7 → 1.0.9

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/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.9] - 2025-02-19
9
+
10
+ ### Changed
11
+
12
+ - Replaced `querystring` with `URLSearchParams` in client
13
+
14
+ ## [1.0.8] - 2025-02-19
15
+
16
+ ### Fixed
17
+
18
+ - Fixed `extends` missing full path in `tsconfig.json`
19
+
8
20
  ## [1.0.7] - 2025-02-19
9
21
 
10
22
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bcchapi",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "API para acceder al Web Service del Banco Central de Chile.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/client.ts CHANGED
@@ -1,4 +1,3 @@
1
- import * as querystring from 'node:querystring';
2
1
  import * as assert from 'node:assert/strict';
3
2
  import { GetSeriesResponse, SearchSeriesResponse, ApiResponse } from './types';
4
3
  import { handleGetSeriesResponse, handleSearchSeriesResponse } from './handlers';
@@ -34,11 +33,11 @@ export class Client {
34
33
  }
35
34
 
36
35
  async request<T extends ApiResponse>(query: Record<string, string>): Promise<T> {
37
- const queryString = querystring.stringify({
36
+ const queryString = new URLSearchParams({
38
37
  user: this.username,
39
38
  pass: this.password,
40
39
  ...query,
41
- });
40
+ }).toString();
42
41
 
43
42
  return (await fetch(`${Client.apiURL}?${queryString}`)).json() as Promise<T>;
44
43
  }
package/tsconfig.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "@tsconfig/node20",
2
+ "extends": "@tsconfig/node20/tsconfig.json",
3
3
  "compilerOptions": {
4
4
  "outDir": "dist",
5
5
  "resolveJsonModule": true,