Skip to content

Commit 0180aa5

Browse files
authored
chore: rename agent-js to icp-js-core (#1126)
1 parent 2dd918b commit 0180aa5

File tree

18 files changed

+38
-51
lines changed

18 files changed

+38
-51
lines changed

.github/CONTRIBUTING.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Directions to set up your project are available in the [README](../README.md).
44

5-
Before you make your changes, check to see if an [issue exists](https://github.com/dfinity/agent-js/issues). If there isn't one, you can [create one](https://github.com/dfinity/agent-js/issues/new/choose) to discuss your proposed changes.
5+
Before you make your changes, check to see if an [issue exists](https://github.com/dfinity/icp-js-core/issues). If there isn't one, you can [create one](https://github.com/dfinity/icp-js-core/issues/new/choose) to discuss your proposed changes.
66

77
## Forking the repository
88

@@ -98,7 +98,7 @@ We utilize the [release-it](https://github.com/release-it/release-it) package to
9898
9999
Start the process by initiating the GitHub Action Workflow `prepare-release.yml`. This can be done by:
100100
101-
- Navigating to the GitHub web UI and clicking "Run workflow" at https://github.com/smallstepman/agent-js/actions/workflows/prepare-release.yml, or
101+
- Navigating to the GitHub web UI and clicking "Run workflow" at https://github.com/dfinity/icp-js-core/actions/workflows/prepare-release.yml, or
102102
- Running this command from your console:
103103
```shell
104104
gh workflow run "prepare-release.yml" -f "semverBump=major"
@@ -249,7 +249,7 @@ Once the changes are merged, you can publish to NPM by running:
249249
- To do this, you will need publishing authorization under our NPM organization. Contact IT if you require access.
250250
- You can include the `--dry-run` flag to verify the version before actual publishing.
251251
252-
After publishing to NPM, go to https://github.com/dfinity/agent-js/releases/new, select "Draft a new release", enter the new tag version (in `v#.#.#` format), and click "Publish release".
252+
After publishing to NPM, go to https://github.com/dfinity/icp-js-core/releases/new, select "Draft a new release", enter the new tag version (in `v#.#.#` format), and click "Publish release".
253253
254254
</details>
255255
@@ -283,14 +283,9 @@ Docs are built and published in the `publish-docs` step of the [`publish.yml`](.
283283
284284
To deprecate a package, follow these steps
285285
286-
- Remove all contents except the package.json, license, and readme
287286
- Add a note to the README saying `**Warning** this package is deprecated`
288-
- Remove unnecessary content, dependencies, and metadata from the package.json
289-
- add a `"deprecation"` tag to the package.json with instructions you want users to follow in migrating
290-
- remove the package as a workspace from the root `package.json`
291-
- the next time that agent-js releases, manually publish a new version of newly deprecated packages by incrementing the patch version and running `pnpm publish:packages`
292-
293-
So far, the following packages were deprecated:
294-
295-
- @dfinity/ledger-identityhq (#665)
296-
- @dfinity/authentication (#665 & #661)
287+
- Increment the patch version of the package in its `package.json` file
288+
- Release the patched version of the package to NPM
289+
- Deprecate the package in NPM with `npm deprecate ...`
290+
- Remove the package from the root [`pnpm-workspace.yaml`](../pnpm-workspace.yaml) file
291+
- Optionally, remove all contents except the package.json, license, and readme. This can be done later, so that the source code stays available for reference for a while.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Please describe the tests that you ran to verify your changes. Provide instructi
1010

1111
# Checklist:
1212

13-
- [ ] My changes follow the guidelines in [CONTRIBUTING.md](https://github.com/dfinity/agent-js/blob/main/.github/CONTRIBUTING.md).
13+
- [ ] My changes follow the guidelines in [CONTRIBUTING.md](https://github.com/dfinity/icp-js-core/blob/main/.github/CONTRIBUTING.md).
1414
- [ ] The title of this PR complies with [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
1515
- [ ] I have edited the CHANGELOG accordingly.
1616
- [ ] I have made corresponding changes to the documentation.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# agent-js
1+
# icp-js-core
22

33
Use an Agent to interact with the Internet Computer from your JavaScript program.
44

docs/astro.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default defineConfig({
2121
integrations: [
2222
starlight({
2323
title: 'ICP JS SDK Core',
24-
social: [{ icon: 'github', label: 'GitHub', href: 'https://github.com/dfinity/agent-js' }],
24+
social: [{ icon: 'github', label: 'GitHub', href: 'https://github.com/dfinity/icp-js-core' }],
2525
plugins: [
2626
dfinityStarlightTheme(),
2727
markdownUrlsPlugin({

docs/src/content/docs/upgrading/v3.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ const combined = concatBytes(buffer1, buffer2);
135135

136136
Several specific error classes have been removed in favor of a new, more generic `AgentError`. This new error class has the following properties:
137137

138-
- `code`: an `ErrorCode` class value, e.g. `CertifiedRejectErrorCode`. See [`errors.ts`](https://github.com/dfinity/agent-js/blob/e7e371b5399d44ea387f21cdcb0e195af4bef2b9/packages/agent/src/errors.ts) for all error codes.
139-
- `kind`: an `ErrorKindEnum` enum value, e.g. `ErrorKindEnum.Trust`. See [`ErrorKindEnum`](https://github.com/dfinity/agent-js/blob/e7e371b5399d44ea387f21cdcb0e195af4bef2b9/packages/agent/src/errors.ts#L9-L18) for all error kinds.
138+
- `code`: an `ErrorCode` class value, e.g. `CertifiedRejectErrorCode`. See [`errors.ts`](https://github.com/dfinity/icp-js-core/blob/e7e371b5399d44ea387f21cdcb0e195af4bef2b9/packages/agent/src/errors.ts) for all error codes.
139+
- `kind`: an `ErrorKindEnum` enum value, e.g. `ErrorKindEnum.Trust`. See [`ErrorKindEnum`](https://github.com/dfinity/icp-js-core/blob/e7e371b5399d44ea387f21cdcb0e195af4bef2b9/packages/agent/src/errors.ts#L9-L18) for all error kinds.
140140
- [`message`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/message): a human-readable error message
141141
- [`cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause): an object containing the `code` and `kind` properties
142142

@@ -288,7 +288,7 @@ const hashed = sha256(myBuffer);
288288

289289
### Cbor package replacement in `@dfinity/agent`
290290

291-
The `@dfinity/agent` package now uses [`@dfinity/cbor`](https://npmjs.com/package/@dfinity/cbor) instead of the `borc` and `simple-cbor` dependencies, reducing the bundle size of most packages [by at least 30% (gzipped) 🤯](https://github.com/dfinity/agent-js/pull/1015#issuecomment-2912381841).
291+
The `@dfinity/agent` package now uses [`@dfinity/cbor`](https://npmjs.com/package/@dfinity/cbor) instead of the `borc` and `simple-cbor` dependencies, reducing the bundle size of most packages [by at least 30% (gzipped) 🤯](https://github.com/dfinity/icp-js-core/pull/1015#issuecomment-2912381841).
292292

293293
**Before:**
294294

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
},
7171
"repository": {
7272
"type": "git",
73-
"url": "https://github.com/dfinity/agent-js"
73+
"url": "https://github.com/dfinity/icp-js-core"
7474
},
7575
"author": "DFINITY Stiftung <sdk@dfinity.org>",
7676
"license": "Apache-2.0",

packages/agent/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"homepage": "https://js.icp.build/core/v3.2/libs/agent",
88
"repository": {
99
"type": "git",
10-
"url": "https://github.com/dfinity/agent-js.git",
10+
"url": "https://github.com/dfinity/icp-js-core.git",
1111
"directory": "packages/agent"
1212
},
1313
"bugs": {
14-
"url": "https://github.com/dfinity/agent-js/issues"
14+
"url": "https://github.com/dfinity/icp-js-core/issues"
1515
},
1616
"keywords": [
1717
"internet computer",

packages/assets/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"homepage": "https://js.icp.build/core/v3.2/libs/assets",
88
"repository": {
99
"type": "git",
10-
"url": "https://github.com/dfinity/agent-js.git",
10+
"url": "https://github.com/dfinity/icp-js-core.git",
1111
"directory": "packages/assets"
1212
},
1313
"bugs": {
14-
"url": "https://github.com/dfinity/agent-js/issues"
14+
"url": "https://github.com/dfinity/icp-js-core/issues"
1515
},
1616
"keywords": [
1717
"internet computer",

packages/auth-client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"homepage": "https://js.icp.build/core/v3.2/libs/auth-client",
88
"repository": {
99
"type": "git",
10-
"url": "https://github.com/dfinity/agent-js.git",
10+
"url": "https://github.com/dfinity/icp-js-core.git",
1111
"directory": "packages/auth-client"
1212
},
1313
"bugs": {
14-
"url": "https://github.com/dfinity/agent-js/issues"
14+
"url": "https://github.com/dfinity/icp-js-core/issues"
1515
},
1616
"keywords": [
1717
"internet computer",

packages/candid/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"homepage": "https://js.icp.build/core/v3.2/libs/candid",
88
"repository": {
99
"type": "git",
10-
"url": "https://github.com/dfinity/agent-js.git",
10+
"url": "https://github.com/dfinity/icp-js-core.git",
1111
"directory": "packages/candid"
1212
},
1313
"bugs": {
14-
"url": "https://github.com/dfinity/agent-js/issues"
14+
"url": "https://github.com/dfinity/icp-js-core/issues"
1515
},
1616
"keywords": [
1717
"internet computer",

0 commit comments

Comments
 (0)