Randall Leeds [Thu, 5 May 2022 00:09:41 +0000 (17:09 -0700)]
Use the default husky directory
Since the husky files are not part of the distribution, and RAT is run
only against the distribution files, it is not necessary to make husky
use a directory that is visible to RAT.
Randall Leeds [Thu, 5 May 2022 00:06:18 +0000 (17:06 -0700)]
Remove non-dist files from .ratignore
Rat should be run on the dist directory to be sure that all files in the
distribution have proper license headers, so it does not need to include
files that are not in the distribution anyway.
Randall Leeds [Thu, 5 May 2022 00:04:51 +0000 (17:04 -0700)]
Exclude .ratignore from git exports
Randall Leeds [Sun, 1 May 2022 03:33:53 +0000 (20:33 -0700)]
Add .gitattributes to .ratignore
Randall Leeds [Sun, 1 May 2022 02:45:28 +0000 (19:45 -0700)]
Move SPDX header comments and remove copyright dates
Keep the SPDX header comments, but move them underneath the ASF headers
to make files human-friendly first and machine-friendly second.
Remove copyright dates from header comments. The ASF recommends against
adding an ASF copyright in the header comment, but does not forbid it.
Keep the copyright headers for compliance with the REUSE specification,
but remove the dates to reduce maintenance burder.
Randall Leeds [Sat, 30 Apr 2022 22:12:30 +0000 (15:12 -0700)]
Bump versions to 0.3.0
Randall Leeds [Sat, 30 Apr 2022 20:57:30 +0000 (13:57 -0700)]
Exclude some repo-related files from exports
Randall Leeds [Sat, 30 Apr 2022 19:49:42 +0000 (12:49 -0700)]
Replace rimraf with shx and skip husky install when not in git
Randall Leeds [Mon, 25 Apr 2022 01:29:06 +0000 (18:29 -0700)]
Merge pull request #121 from apache/dependabot/npm_and_yarn/node-fetch-2.6.7
Bump node-fetch from 2.6.0 to 2.6.7
Randall Leeds [Mon, 25 Apr 2022 01:28:38 +0000 (18:28 -0700)]
Merge pull request #122 from apache/dependabot/npm_and_yarn/trim-off-newlines-1.0.3
Bump trim-off-newlines from 1.0.1 to 1.0.3
Randall Leeds [Mon, 25 Apr 2022 01:28:12 +0000 (18:28 -0700)]
Merge pull request #123 from apache/dependabot/npm_and_yarn/async-2.6.4
Bump async from 2.6.3 to 2.6.4
dependabot[bot] [Sun, 24 Apr 2022 04:24:05 +0000 (04:24 +0000)]
Bump trim-off-newlines from 1.0.1 to 1.0.3
Bumps [trim-off-newlines](https://github.com/stevemao/trim-off-newlines) from 1.0.1 to 1.0.3.
- [Release notes](https://github.com/stevemao/trim-off-newlines/releases)
- [Commits](https://github.com/stevemao/trim-off-newlines/compare/v1.0.1...v1.0.3)
---
updated-dependencies:
- dependency-name: trim-off-newlines
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Sun, 24 Apr 2022 04:24:05 +0000 (04:24 +0000)]
Bump async from 2.6.3 to 2.6.4
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)
---
updated-dependencies:
- dependency-name: async
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Sun, 24 Apr 2022 04:23:59 +0000 (04:23 +0000)]
Bump node-fetch from 2.6.0 to 2.6.7
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.0 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.0...v2.6.7)
---
updated-dependencies:
- dependency-name: node-fetch
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com>
Randall Leeds [Sun, 24 Apr 2022 04:15:48 +0000 (21:15 -0700)]
Upgrade Husky from v4 to v7
Randall Leeds [Sun, 24 Apr 2022 03:13:04 +0000 (20:13 -0700)]
Better specify targets for modern code output
Set the esmodules target to eliminate browsers that are part of the
browserslist defaults but that do not support modules. Set the node
minimum node version.
Randall Leeds [Sun, 24 Apr 2022 02:39:32 +0000 (19:39 -0700)]
Drop support for Node.js v12
Node.js version 12 is end of life soon.
Randall Leeds [Sun, 24 Apr 2022 02:23:48 +0000 (19:23 -0700)]
Remove upper bound on Node.js version
Randall Leeds [Sun, 24 Apr 2022 02:19:24 +0000 (19:19 -0700)]
Reduce Makefile repitition with dist variables
Randall Leeds [Fri, 15 Apr 2022 21:54:32 +0000 (14:54 -0700)]
Consistently use tabs in Makefile
Randall Leeds [Fri, 15 Apr 2022 21:46:09 +0000 (14:46 -0700)]
Use git archive instead of git clone
Including a git directory in the dist tarball is a convenient trick for
easing comparison between the archive and the release tag, but it is not
necessary and may be confusing.
Randall Leeds [Fri, 15 Apr 2022 17:43:17 +0000 (10:43 -0700)]
Bump copyright year to 2022
Randall Leeds [Sun, 5 Dec 2021 01:50:41 +0000 (17:50 -0800)]
Merge pull request #117 from apache/esm-tests
Randall Leeds [Thu, 11 Nov 2021 07:59:06 +0000 (23:59 -0800)]
Fix module resolver alias to work on Windows again
Randall Leeds [Mon, 8 Nov 2021 04:00:12 +0000 (20:00 -0800)]
Use simpler syntax for module resolution aliases
Randall Leeds [Mon, 8 Nov 2021 03:58:09 +0000 (19:58 -0800)]
Report coverage for all files with c8
Randall Leeds [Mon, 8 Nov 2021 03:24:50 +0000 (19:24 -0800)]
Allow Babel to use ECMAScript helpers in the test environment
Randall Leeds [Mon, 8 Nov 2021 02:51:22 +0000 (18:51 -0800)]
Resolve extensions on relative imports for webpack
Configure babel-plugin-module-resolver to resolve relative import paths
from TypeScript source files of the workspace packages to the TypeScript
source file that corresponds to the import path.
Randall Leeds [Mon, 1 Nov 2021 08:36:13 +0000 (01:36 -0700)]
Add Node.js v17 to workspace engines fields
Randall Leeds [Mon, 1 Nov 2021 07:40:10 +0000 (00:40 -0700)]
Add Node.js v17 to top-level engines field
Randall Leeds [Mon, 1 Nov 2021 05:38:30 +0000 (22:38 -0700)]
Run tests with real ECAMAScript modules
Compile to ECMAScript module syntax for tests.
- Replace nyt with c8
- Replace optimal-select with @medv/finder
- Replace custom babel-register with babel-register-esm
Randall Leeds [Mon, 1 Nov 2021 04:42:11 +0000 (21:42 -0700)]
Require file extensions on relative imports
Add file extensions to all relative imports to better align with the
requirements of spec-compliant ECMAScript modules.
Randall Leeds [Mon, 1 Nov 2021 04:39:50 +0000 (21:39 -0700)]
Replace chai with built-in strict assert
The chai package does not support named exports in a form that Node.js
can detect them statically. In order to prepare the tests to run as real
ECMAScript modules, switch to using the built-in assert module.
Randall Leeds [Sun, 17 Oct 2021 23:22:19 +0000 (16:22 -0700)]
Upgrade Mocha from v8.0.1 to v9.1.3
Gerben [Tue, 7 Sep 2021 20:52:28 +0000 (22:52 +0200)]
Reflect branch rename master→main
Gerben [Fri, 3 Sep 2021 10:46:55 +0000 (12:46 +0200)]
Fix dependency: dom depends on selector
Gerben [Fri, 3 Sep 2021 10:23:13 +0000 (12:23 +0200)]
Bump v0.1.0 → v0.2.0 (better late than never?)
Randall Leeds [Fri, 16 Jul 2021 00:59:00 +0000 (17:59 -0700)]
Fix linter resolutions
Restore the use of TypeScript project references to the TypeScript
ESLint plugin. Move the optimal-select module declaration to the root of
the dom package, where TypeScript will automatically find it. Disable
the import/no-unresolved rule for TypeScript files because TypeScript
itself will check that modules resolve.
Gerben [Wed, 14 Jul 2021 21:25:38 +0000 (23:25 +0200)]
Copyright like it’s 2021.
Gerben [Wed, 14 Jul 2021 21:12:35 +0000 (23:12 +0200)]
Update and merge PR #107 (REUSE compliance)
Reapply the SPDX header to current files, and some others that seem to
have been overlooked.
Copy LICENSE file instead of moving it (symlinking it breaks Rat, somehow).
Gerben [Wed, 14 Jul 2021 20:19:27 +0000 (22:19 +0200)]
Make clean command clean more stuff
Using gitignore as reference.
Is ‘/coverage’ still actually created by something?
Also making a tiny nitpick in gitignore.
Gerben [Wed, 14 Jul 2021 20:10:16 +0000 (22:10 +0200)]
Please linter
Gerben [Wed, 14 Jul 2021 19:30:16 +0000 (21:30 +0200)]
Satisfy the Rat
Gerben [Fri, 9 Jul 2021 15:32:39 +0000 (17:32 +0200)]
Add warning about issue #112.
Gerben [Fri, 9 Jul 2021 15:06:55 +0000 (17:06 +0200)]
Improve CssSelector docs
Gerben [Fri, 25 Jun 2021 16:07:57 +0000 (18:07 +0200)]
Tiny fixes
Gerben [Fri, 25 Jun 2021 16:02:40 +0000 (18:02 +0200)]
Dedupe & refactor range comparison code
Gerben [Fri, 25 Jun 2021 15:41:27 +0000 (17:41 +0200)]
Test all cases with DOM mutation
Gerben [Fri, 25 Jun 2021 15:16:33 +0000 (17:16 +0200)]
Add cases for matches in multiple nodes
In the case of DOM changes, a different error occurs depending on whether
the matches are in the same or different text nodes. With different nodes,
the infinite loop behaviour occurs.
Gerben [Fri, 25 Jun 2021 15:15:12 +0000 (17:15 +0200)]
Add failing test changing DOM (text quote match)
See issue #112 <https://github.com/apache/incubator-annotator/issues/112>
Gerben [Fri, 25 Jun 2021 09:48:28 +0000 (11:48 +0200)]
Forgotten rename
Gerben [Fri, 25 Jun 2021 09:17:12 +0000 (11:17 +0200)]
Make highlightRange accept Node, rename to highlightText
Fixes issue #111 <https://github.com/apache/incubator-annotator/issues/111>
Gerben [Sun, 20 Jun 2021 13:29:04 +0000 (15:29 +0200)]
Simplify tests
Possible since a Node is now accepted as the scope
Gerben [Thu, 25 Jun 2020 21:38:11 +0000 (23:38 +0200)]
Test for range without Text nodes (describe text quote)
Gerben [Sun, 6 Jun 2021 13:40:31 +0000 (15:40 +0200)]
…also in each package
Gerben [Sun, 6 Jun 2021 13:31:41 +0000 (15:31 +0200)]
Add node 16 to engines
Gerben [Sun, 6 Jun 2021 12:32:08 +0000 (14:32 +0200)]
tweak documentation
Gerben [Sat, 5 Jun 2021 17:38:57 +0000 (19:38 +0200)]
Use node as scope in demo
Gerben [Sat, 5 Jun 2021 16:57:34 +0000 (18:57 +0200)]
Declare types for optimal-select dependency
The linter does not seem to pick it up however..
Gerben [Sat, 5 Jun 2021 16:30:03 +0000 (18:30 +0200)]
Run linter
Gerben [Sat, 5 Jun 2021 16:32:22 +0000 (18:32 +0200)]
Merge branch 'allow-node-as-scope' (PR #110)
Gerben [Sat, 5 Jun 2021 16:22:04 +0000 (18:22 +0200)]
Rename range-node-conversion.ts → to-range.ts
Gerben [Fri, 4 Jun 2021 18:05:31 +0000 (20:05 +0200)]
Make all functions also accept a Node as scope
Gerben [Fri, 4 Jun 2021 17:38:39 +0000 (19:38 +0200)]
Make css matcher also accept a Node as scope
Gerben [Fri, 4 Jun 2021 17:23:23 +0000 (19:23 +0200)]
Make css matcher return an Element, not Range
Gerben [Fri, 4 Jun 2021 19:25:29 +0000 (21:25 +0200)]
Remove forgotten .only in tests
Gerben [Fri, 4 Jun 2021 18:53:22 +0000 (20:53 +0200)]
Document describeCss, tweak docs of describeText…
Gerben [Fri, 4 Jun 2021 17:02:47 +0000 (19:02 +0200)]
Make default scope of describeCss the whole document
Instead of just the body.
Accordingly, allow any Node as scope, not only Elements.
Gerben [Mon, 24 May 2021 22:59:21 +0000 (00:59 +0200)]
Add describeCss & tests, document spec ambiguity
I tried a few css selector generators, listed here:
<https://github.com/fczbkk/css-selector-generator-benchmark>
- css-selector-generator failed when a root (= scope) is passed; see
issue <https://github.com/fczbkk/css-selector-generator/issues/65>.
- using @mdev/finder instead gave syntax errors due to ‘export’ token.
(perhaps because we don’t transpile dependencies; worth considering?)
- optimal-select seemed to work; whatever works is good enough for now.
I made describeCss accept an Element, not a Range, for its scope and
target, as Ranges make little sense for a CssSelector; I figured we may
want to change this in the matcher too, and perhaps more widely.
Gerben [Mon, 24 May 2021 21:05:08 +0000 (23:05 +0200)]
tweak doc
Gerben [Sun, 16 May 2021 21:50:58 +0000 (23:50 +0200)]
Add short typedoc @module descriptions
It seems this needs to be done in packages/apache-annotator; if put in
the individual packages’ index.ts files, it does not show up in the docs.
Gerben [Sun, 16 May 2021 21:47:30 +0000 (23:47 +0200)]
Make Readme point to docs on website
It is helpful there, but too easily gets outdated if we have content
duplicated in multiple places.
Gerben [Sat, 15 May 2021 22:31:54 +0000 (00:31 +0200)]
Improve hot module reloading in demo
So that old highlights still get cleaned up.
Randall Leeds [Sat, 15 May 2021 20:29:55 +0000 (13:29 -0700)]
Simplify the ESLint module resolver configuration
Randall Leeds [Sat, 15 May 2021 20:28:50 +0000 (13:28 -0700)]
Lint cartesian.test.ts
Gerben [Sat, 8 May 2021 20:41:01 +0000 (22:41 +0200)]
Tweak typedoc config
Setting "disableSources" because the generated links incorrectly point
to generated files (lib/….d.ts) rather than their source files.
(why does it not use the declaration map to find the correct file&line?)
If we do get it to work, we could use typedoc-plugin-sourcefile-url to
point to the apache repo by adding:
"sourcefile-url-prefix": "https://gitbox.apache.org/repos/asf?p=incubator-annotator.git;a=blob;hb=refs/heads/master;f=packages/"
Gerben [Sat, 8 May 2021 21:03:14 +0000 (23:03 +0200)]
Fix link to demo source code
Gerben [Sat, 24 Apr 2021 18:00:59 +0000 (20:00 +0200)]
Clean up remnants of in-browser tests
See commit
6a42375
Gerben [Sat, 24 Apr 2021 17:57:31 +0000 (19:57 +0200)]
Make web:build work again
Partially reverts commit
6a42375; which while removing the in-browser
tests (as advertised) also broke the build that our website relies on.
Randall Leeds [Sun, 18 Apr 2021 21:48:29 +0000 (14:48 -0700)]
Close source iterators on cartesian exit
Randall Leeds [Sun, 18 Apr 2021 21:48:02 +0000 (14:48 -0700)]
Add watch files to mocha configuration
Randall Leeds [Sun, 11 Apr 2021 23:42:57 +0000 (16:42 -0700)]
Do not publish tsconfig.json and tsconfig.tsbuildinfo files
Randall Leeds [Sun, 11 Apr 2021 23:10:09 +0000 (16:10 -0700)]
Do not publish declaration maps
Declaration map files are useful during development to enable navigation
to original sources inside an editor, but are not useful for end users.
Randall Leeds [Sun, 11 Apr 2021 22:55:20 +0000 (15:55 -0700)]
Remove mocha tests from webpack build
The mocha-loader is unmaintained and running the tests in a real browser
in this way without a CI browser test matrix provides little value.
Randall Leeds [Sun, 11 Apr 2021 22:38:53 +0000 (15:38 -0700)]
Enable experimental support for linting TypeScript project references
This change makes it possible to get correct linting results without
building the projects.
Randall Leeds [Sun, 11 Apr 2021 22:37:14 +0000 (15:37 -0700)]
Emit source maps as separate files
Provide source maps as separate files in the build so that the common
case of importing the code without debugging it does not require reading
all those extra bytes.
Randall Leeds [Sun, 11 Apr 2021 22:23:19 +0000 (15:23 -0700)]
Remove CommonJS build
Supporting two builds has been complicated and increasingly unnecessary.
Expect consumers to be using bundlers or versions of Node.js that have
support for ECMAScript Modules.
Randall Leeds [Wed, 7 Apr 2021 04:01:07 +0000 (21:01 -0700)]
Merge pull request #108 from fredsterorg/master
Minor changes
fredster33 [Tue, 6 Apr 2021 17:23:08 +0000 (10:23 -0700)]
Minor changes
Gerben [Mon, 5 Apr 2021 18:59:28 +0000 (20:59 +0200)]
Turn tsdoc into typedoc
Gerben [Tue, 5 Jan 2021 17:39:09 +0000 (18:39 +0100)]
More API documentation!
Gerben [Mon, 5 Apr 2021 18:29:02 +0000 (20:29 +0200)]
Actually, don’t always build the docs.
Also build docs *after* the type declarations, not concurrently.
We still want to remove the docs directory upon cleaning, I suppose.
Gerben [Mon, 5 Apr 2021 18:02:22 +0000 (20:02 +0200)]
Fix typedoc entrypoint
The entrypoint referred to was removed in commit
848dc3c
Gerben [Mon, 5 Apr 2021 18:01:51 +0000 (20:01 +0200)]
Add build:docs command, remove /docs in clean command
Randall Leeds [Sun, 4 Apr 2021 05:47:12 +0000 (22:47 -0700)]
Enable the @typescript-eslint/no-duplicate-imports rule
Randall Leeds [Sun, 4 Apr 2021 05:34:20 +0000 (22:34 -0700)]
Enable support for proposals in the babel runtime transformation
Enable support for proposals in @babel/plugin-transform-runtime because
ESLint and TypeScript will take care of rejecting syntax that is not
enabled by the configured language versions and library definitions, but
proposals that have shipped.
Randall Leeds [Sun, 4 Apr 2021 05:33:31 +0000 (22:33 -0700)]
Move babel targets to the top level of the configuration
Randall Leeds [Sun, 4 Apr 2021 05:20:46 +0000 (22:20 -0700)]
Upgrade babel dependencies from v7.12 to v7.13
Randall Leeds [Sun, 4 Apr 2021 05:05:34 +0000 (22:05 -0700)]
Upgrade global-jsdom from v6.1.0 to v8.0.0
Randall Leeds [Sun, 4 Apr 2021 05:01:47 +0000 (22:01 -0700)]
Opt into explicit TypeScript index property access
Opt into a new feature of TypeScript that restores an old behavior
wherein accessing properties that match an index signature requires
using bracket syntax. With this change, TypeScript will catch dotted
attributed access that might be incorrect, but allow access with bracket
notation that may be useful in certain scenarios.