Skip to content

Conversation

@ComfortablyCoding
Copy link
Owner

@ComfortablyCoding ComfortablyCoding commented May 22, 2024

This PR introduces the next major version of this package.

TODO

  • move codebase to ESM (build will be ESM + CJS)
  • use pnpm over rpm
  • update codebase
    • remove unnecessary abstractions
    • add parent Route class
    • add custom error per clickup api spec
    • add new endpoints
    • remove outdated packages
    • update prettier and eslint rules
    • add automatic rate limiting
  • use vitest for testing and update tests accordingly
  • update docs with new functions
  • document breaking changes
  • update doc links to GH pages URL

@ComfortablyCoding ComfortablyCoding added bug Something isn't working enhancement New feature or request labels May 22, 2024
@ComfortablyCoding ComfortablyCoding self-assigned this May 22, 2024
@ComfortablyCoding ComfortablyCoding changed the title V next v-next May 22, 2024
@ComfortablyCoding ComfortablyCoding changed the title v-next feat: v-next May 22, 2024
@fidelix
Copy link

fidelix commented Oct 31, 2025

Is there still interest in this? Would you like other people to test at this stage?

@ComfortablyCoding ComfortablyCoding marked this pull request as ready for review November 2, 2025 21:43
@ComfortablyCoding
Copy link
Owner Author

ComfortablyCoding commented Nov 2, 2025

Is there still interest in this? Would you like other people to test at this stage?

Yes! It got put on the back burner for a bit, but should be in a good place now

Please feel free to test it, any feedback or suggestions are more than welcome.

It’s still missing the v3 endpoints and a migration to TypeScript for improved IntelliSense but it's good enough for an initial release.

@fidelix
Copy link

fidelix commented Nov 4, 2025

I'm unable to test it because package.json has:
"build": "unbuild",
and files array with ./dist

So the repo gets fetched without src.

@ComfortablyCoding
Copy link
Owner Author

I'm unable to test it because package.json has: "build": "unbuild", and files array with ./dist

So the repo gets fetched without src.

These changes are not built or released yet. To test you would need to clone the branch, run pnpm run build and then import the client from the dist folder.

@fidelix
Copy link

fidelix commented Nov 4, 2025

Hi, first attempt at using it:
[GET] "https://api.clickup.com/api/undefined/team/XXX/webhook": 404 Not Found

I tried to:

clickup.team.webhooks(teamId);

this.version is undefined here:

webhooks(teamId) {
    return this.client.request({
      path: `${this.version}/${this.route}/${teamId}/webhook`
    });
  }

Even after adding this.version = "v2"; in the route constructor, I received Unauthorized instead. It seems the request is not being built properly.

Comment on lines +9 to +23
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4

- name: setup
uses: ./.github/actions/setup

- name: publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: |
pnpm publish \
--access=public \

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 10 days ago

To resolve the issue, add a permissions block to the workflow configuration to restrict the GITHUB_TOKEN to the least necessary privileges. The best location is at the root of the workflow (under the workflow name or triggers) if you want to define permissions for all jobs, or within each job's config if you need more granularity.

For this workflow, a minimal permissions block such as contents: read will almost always suffice for publishing to npm (actual publishing is authenticated via the NODE_AUTH_TOKEN), though if you use npm provenance you may also want id-token: write. To strictly follow the principle of least privilege for the visible steps, add the following at the top level just after the workflow name and before the on: trigger:

permissions:
  contents: read

Edit .github/workflows/publish.yml to insert this block after name: Publish. No new packages or external imports are required.


Suggested changeset 1
.github/workflows/publish.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -1,4 +1,6 @@
 name: Publish
+permissions:
+  contents: read
 
 on:
   release:
EOF
@@ -1,4 +1,6 @@
name: Publish
permissions:
contents: read

on:
release:
Copilot is powered by AI and may make mistakes. Always verify output.
@ComfortablyCoding
Copy link
Owner Author

ComfortablyCoding commented Nov 4, 2025

Ha, not a great start.

It seems the route file got overridden at some point, I have fixed that and added tests to ensure it won't regress. The token issue should be resolved as well.

I also improved the error format to help debug any future errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants