-
-
Notifications
You must be signed in to change notification settings - Fork 574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 4: Typescript, ESM, glob removal, drop node <18 #1195
Commits on Jan 18, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 83853fd - Browse repository at this point
Copy the full SHA 83853fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8800112 - Browse repository at this point
Copy the full SHA 8800112View commit details -
Configuration menu - View commit details
-
Copy full SHA for abe7809 - Browse repository at this point
Copy the full SHA abe7809View commit details -
Configuration menu - View commit details
-
Copy full SHA for cac97c6 - Browse repository at this point
Copy the full SHA cac97c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 49d5958 - Browse repository at this point
Copy the full SHA 49d5958View commit details -
Configuration menu - View commit details
-
Copy full SHA for 46e8570 - Browse repository at this point
Copy the full SHA 46e8570View commit details -
Configuration menu - View commit details
-
Copy full SHA for fbc7324 - Browse repository at this point
Copy the full SHA fbc7324View commit details -
Configuration menu - View commit details
-
Copy full SHA for 28908d3 - Browse repository at this point
Copy the full SHA 28908d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1aa80ac - Browse repository at this point
Copy the full SHA 1aa80acView commit details -
Configuration menu - View commit details
-
Copy full SHA for f4eb8e2 - Browse repository at this point
Copy the full SHA f4eb8e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 22a5ec9 - Browse repository at this point
Copy the full SHA 22a5ec9View commit details
Commits on Feb 5, 2024
-
test: fix up async bug in test setup
The dynamic import causes the `describe` blocks to happen later, which means the `after` and `afterEach` have already run (and cleaned up) at that point. It also turns out the old version of rimraf wasn't awaitable, so it has been upgraded in this change.
Configuration menu - View commit details
-
Copy full SHA for 585d968 - Browse repository at this point
Copy the full SHA 585d968View commit details
Commits on Feb 6, 2024
-
test: revert close test and fix race condition
This reverts to what the test is in `master` but fixes an async race condition. Essentially: ```ts await waitForWatcher(watcher1); // at this point, the ready event has fired for watcher1 _and_ watcher2 await waitForWatcher(watcher2); // this never gets reached because it fired before we added the event // handler ``` Awaiting both in a `Promise.all` fixes this since the event handlers will be attached immediately.
Configuration menu - View commit details
-
Copy full SHA for aaa08be - Browse repository at this point
Copy the full SHA aaa08beView commit details -
test: fix dynamic import path of chokidar
Since we're locally importing this, node will not resolve the import path as if it is an NPM package (i.e. it will not infer the `main` path, or package exports). Instead, we need to import the exact path it seems (`lib/index.js`).
Configuration menu - View commit details
-
Copy full SHA for 44aab1b - Browse repository at this point
Copy the full SHA 44aab1bView commit details -
This reverts the test for ignoring events after close, since it seems the original passes fine and makes this consistent with the other tests again in structure.
Configuration menu - View commit details
-
Copy full SHA for 8cc1e66 - Browse repository at this point
Copy the full SHA 8cc1e66View commit details -
feat: rework anymatch and fix ignored paths
This reworks the anymatch function to be a little less generic since we now know exactly what we want to call it with. This means we have much clearer/stronger types. On top of that, support for ignored paths has been implemented again (it was removed with a `TODO` until now, in v4). Keep in mind the way we store ignored paths may change in future so we can more efficiently access and remove them without the need for full iterations through the set.
Configuration menu - View commit details
-
Copy full SHA for 4c98a6b - Browse repository at this point
Copy the full SHA 4c98a6bView commit details -
chore: introduce tseslint and fix lint script
We were running ESLint against `*.js` (the default) which no longer exists, so `--ext` has been added to make it check `*.ts` files. Alongside that, TSESLint has been added and the recommended config enabled. For now, these two rules are disabled: - `no-explicit-any` - until we strongly type everything - `no-unused-vars` - probably permanently, using typescript's own `noUnusedLocals` instead
Configuration menu - View commit details
-
Copy full SHA for e2bced6 - Browse repository at this point
Copy the full SHA e2bced6View commit details
Commits on Feb 7, 2024
-
feat: rework ignore matcher add/remove & add types
This basically does two things: 1. Adds `WatchHelper` to some of the methods for a stronger type 2. Reworks how we add/remove ignore paths ("matchers") In the latter, thanks to a previous change where we can have "matcher objects", we need to iterate through existing ignore paths to make sure we don't duplicate them. Similarly, when removing a "path", we need to find any matcher objects which use the same path and remove those too. Basically introducing `addIgnorePath` and `removeIgnorePath` instead of mutating the set directly.
Configuration menu - View commit details
-
Copy full SHA for 9ba9ac5 - Browse repository at this point
Copy the full SHA 9ba9ac5View commit details
Commits on Feb 9, 2024
-
Trying to fix some tests, the `interval` used to be `undefined` by default. That mean we would later compare `n > undefined` (which would be false). Changing it to `0` means `n > 0` would now be true. This doesn't actually fix the tests most likely but may as well revert to the same behavior for now.
Configuration menu - View commit details
-
Copy full SHA for cf5e73b - Browse repository at this point
Copy the full SHA cf5e73bView commit details -
fix: mac OS inodes change just like linux
When a file changes in linux, it gets a new inode which means our `fs.watch` will still be watching the old inode, not the new one. To get around this, we already remove the watcher and add a new one for the new inode. However, we don't apply this logic to MacOS, which also has the same behaviour (creates a new inode when a file changes in some cases). This change just makes it so we run the same logic for linux _and_ mac.
Configuration menu - View commit details
-
Copy full SHA for 9d16426 - Browse repository at this point
Copy the full SHA 9d16426View commit details -
Configuration menu - View commit details
-
Copy full SHA for a01bbdd - Browse repository at this point
Copy the full SHA a01bbddView commit details
Commits on Mar 19, 2024
-
This just enables running the build script in CI such that tests have access to the build output when they run (as we're now using typescript).
Configuration menu - View commit details
-
Copy full SHA for 5523179 - Browse repository at this point
Copy the full SHA 5523179View commit details -
feat: re-enable fsevents conditional
This re-enables the conditional import of `fsevents` since it will be unavailable on some platforms.
Configuration menu - View commit details
-
Copy full SHA for 3caba37 - Browse repository at this point
Copy the full SHA 3caba37View commit details -
A bit of chicken-and-egg situation means we can't pull the official fsevents types. Basically, fsevents will only install on certain platforms (macOS?). Of course, if we're not on a supported platform, that also means we won't have access to the shipped typescript types. To solve this, we have to keep a copy of the types ourselves.
Configuration menu - View commit details
-
Copy full SHA for 57c0cfd - Browse repository at this point
Copy the full SHA 57c0cfdView commit details -
Upgrades to typescript 5.x since the latest node types require that for some newer syntax.
Configuration menu - View commit details
-
Copy full SHA for d4bc683 - Browse repository at this point
Copy the full SHA d4bc683View commit details
Commits on Mar 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a178985 - Browse repository at this point
Copy the full SHA a178985View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a93273 - Browse repository at this point
Copy the full SHA 9a93273View commit details -
Configuration menu - View commit details
-
Copy full SHA for cd168d6 - Browse repository at this point
Copy the full SHA cd168d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0101e20 - Browse repository at this point
Copy the full SHA 0101e20View commit details
Commits on Mar 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b8fdee2 - Browse repository at this point
Copy the full SHA b8fdee2View commit details
Commits on Mar 25, 2024
-
As per the nodeJS docs, the built-in `fs.watch` will now use `fsevents` under the hood for watching directories. This means we should no longer need the `fsevents` dependency and can instead just delegate to node. Some stability changes have been made to the tests, too. Generally waiting for explicit conditions rather than arbitrary delays.
Configuration menu - View commit details
-
Copy full SHA for 7e8c742 - Browse repository at this point
Copy the full SHA 7e8c742View commit details
Commits on Mar 26, 2024
-
test: fix symlinks on windows during testing
On windows, a symlink can be created as a `file`, a `dir`, or a `junction`. Meanwhile, on unix-like systems, this type doesn't seem to matter much (or is ignored). By default, the type will be `file` on windows. Due to this, all directories we symlink in tests are actually created as "files" which leads to all sorts of permissions errors. This change basically makes it explicit that the symlinked directories are in fact directories (`dir`), thus making tests pass.
Configuration menu - View commit details
-
Copy full SHA for 928a755 - Browse repository at this point
Copy the full SHA 928a755View commit details
Commits on Mar 27, 2024
-
test: wait for each write to trigger an event
This test is incredibly flaky across different platforms, node versions, etc when we try write all the files at once. Instead, we now write a file at a time and wait for the spy to have been called before moving on. Not quite as accurate as real world but seems to be the only way to make this stable.
Configuration menu - View commit details
-
Copy full SHA for 75eb523 - Browse repository at this point
Copy the full SHA 75eb523View commit details -
This adds node 21.x to the matrix in our CI workflow (making it now run on 18, 20 and 21).
Configuration menu - View commit details
-
Copy full SHA for 6c20448 - Browse repository at this point
Copy the full SHA 6c20448View commit details
Commits on May 18, 2024
-
test: wait for watcher in before
Attempts to fix some timing issues in tests by waiting for watchers to be ready before continuing with the test cases.
Configuration menu - View commit details
-
Copy full SHA for eafeb45 - Browse repository at this point
Copy the full SHA eafeb45View commit details
Commits on May 20, 2024
-
chore: bump node versions in engine constraint
Bumps the version to `>= 18` and replaces `21` with `22` in the CI workflows.
Configuration menu - View commit details
-
Copy full SHA for f963c0b - Browse repository at this point
Copy the full SHA f963c0bView commit details
Commits on May 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for cdfd50e - Browse repository at this point
Copy the full SHA cdfd50eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ae0232b - Browse repository at this point
Copy the full SHA ae0232bView commit details
Commits on May 26, 2024
-
test: switch to node test runner
Switches to using the built-in node test runner and drops mocha. Temporarily also introduces a `TEST_TIMEOUT` as `--test-timeout` is only available in 20.x and above, but we run CI in 18.x.
Configuration menu - View commit details
-
Copy full SHA for b879371 - Browse repository at this point
Copy the full SHA b879371View commit details
Commits on Jun 2, 2024
-
Adds a small delay in some tests after the initial path has been added (to avoid the FS de-duping/cancelling events).
Configuration menu - View commit details
-
Copy full SHA for dda8034 - Browse repository at this point
Copy the full SHA dda8034View commit details -
Merge pull request #1318 from 43081j/v4-test-runner
test: switch to node test runner
Configuration menu - View commit details
-
Copy full SHA for abc4688 - Browse repository at this point
Copy the full SHA abc4688View commit details -
chore: upgrade to flat eslint configs
Upgrades eslint and switches to using the new flat config structure.
Configuration menu - View commit details
-
Copy full SHA for 430d643 - Browse repository at this point
Copy the full SHA 430d643View commit details -
Merge pull request #1320 from 43081j/v4-eslint
chore: upgrade to flat eslint configs
Configuration menu - View commit details
-
Copy full SHA for bd3c8a0 - Browse repository at this point
Copy the full SHA bd3c8a0View commit details
Commits on Jun 25, 2024
-
feat: move to node:fs/promises
Moves to using `node:fs/promises` rather than using `promisify` manually.
Configuration menu - View commit details
-
Copy full SHA for 9594771 - Browse repository at this point
Copy the full SHA 9594771View commit details
Commits on Jun 28, 2024
-
Merge pull request #1329 from 43081j/async-fs
feat: move to node:fs/promises
Configuration menu - View commit details
-
Copy full SHA for c8c3ff2 - Browse repository at this point
Copy the full SHA c8c3ff2View commit details
Commits on Jul 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d9f30a5 - Browse repository at this point
Copy the full SHA d9f30a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f715a9 - Browse repository at this point
Copy the full SHA 6f715a9View commit details