Skip to content

DEVELOP-2300-4: extension:watch now ignores node_modules#54

Merged
tim-field merged 1 commit intomainfrom
DEVELOP-2300-4-fix-aha-cli-failing-when-watching-zendesk-extension
Apr 2, 2026
Merged

DEVELOP-2300-4: extension:watch now ignores node_modules#54
tim-field merged 1 commit intomainfrom
DEVELOP-2300-4-fix-aha-cli-failing-when-watching-zendesk-extension

Conversation

@tim-field
Copy link
Copy Markdown
Contributor

@tim-field tim-field commented Apr 2, 2026

extension:watch will now ignore node_modules. Bumped package version as this is technically a breaking change, but extension:watch is broken at least in the zendesk extension without this.

Note its possible to test this locally like so
yarn pack

npx --yes --package /{path-to-built.tgz}.tgz aha extension:watch

Update dependent node types and resulting errors
Ignore node_modules this is causing high cpu / failures in zendesk extension
Comment thread src/utils/esbuild-http.ts
// would probably need to be more complex.
build.onLoad({ filter: /.*/, namespace: 'http-url' }, async args => {
let contents: Buffer;
let contents: Uint8Array;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appeasing TS after Node types upgrade ( which is required for chokidar update )

Comment thread src/utils/simple-cache.ts
async set(url: string, data: Buffer) {
const filePath = path.join(this.location, this.hash(url));
return fs.writeFile(filePath, data);
return fs.writeFile(filePath, new Uint8Array(data));
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appease TS, Buffer can't be passed to writeFile

chokidar
.watch('.', { ignoreInitial: true, ignored: '.git' })
.on('all', async (event, changedPath) => {
.watch('.', { ignoreInitial: true, ignored: ['.git', 'node_modules'] })
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore node_modues

This is a breaking change, hence the version bump. But is required to watch the zendesk extension without using all your CPU as it stands.

@tim-field tim-field marked this pull request as ready for review April 2, 2026 00:38
@tim-field tim-field changed the title DEVELOP-2300-4: Fix Aha-cli failing when watching zendesk extension DEVELOP-2300-4: extension:watch now ignores node_modules Apr 2, 2026
@tim-field tim-field merged commit bafa4a3 into main Apr 2, 2026
2 checks passed
@tim-field tim-field deleted the DEVELOP-2300-4-fix-aha-cli-failing-when-watching-zendesk-extension branch April 2, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants