You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ra...@apache.org on 2020/09/20 03:39:33 UTC
[incubator-annotator] branch master updated (311e8db -> 13b6b35)
This is an automated email from the ASF dual-hosted git repository.
randall pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git.
from 311e8db Remove core-js dependency
new 9eb9774 Autofix lint
new 23e0754 Add directory entries to package repository metadata
new 3f1243e Add meta-package reference to top-level tsconfig.json solution
new 363b360 Resolve sources to absolute filenames for development and testing
new 66edfaf Make the build concurrent
new 18a1df0 Forbid importing absolute paths
new c5963bb Update the import order rules
new a5b400a Drop ESLint and TypeScript compilation target from es2018 to es2017
new 6635e19 Remove extraneous parser option in ESLint configuration
new 13b6b35 Simplify TypeScript library support definition
The 10 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.eslintrc.js | 24 ++++++++---
babel.config.js | 7 +++-
package.json | 13 +++---
packages/apache-annotator/package.json | 3 +-
packages/dom/package.json | 3 +-
packages/dom/src/css.ts | 1 -
packages/dom/src/range/match.ts | 2 -
packages/dom/src/text-quote/describe.ts | 23 +++++++----
packages/dom/src/text-quote/match.ts | 3 +-
.../test/highlight-range/highlight-range.test.ts | 1 -
packages/dom/test/range/cartesian.test.ts | 1 -
packages/dom/test/text-quote/describe-cases.ts | 1 -
packages/dom/test/text-quote/describe.test.ts | 2 -
packages/dom/test/text-quote/match-cases.ts | 1 -
packages/dom/test/text-quote/match.test.ts | 4 +-
packages/selector/package.json | 3 +-
test/data-model.test.ts | 1 -
tsconfig.base.json | 2 +-
tsconfig.json | 6 +--
yarn.lock | 47 ++++++++++++++++++++--
20 files changed, 101 insertions(+), 47 deletions(-)
[incubator-annotator] 07/10: Update the import order rules
Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit c5963bb9f5707094937f9b2dc21b7e84de027ccc
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Sat Sep 19 20:28:09 2020 -0700
Update the import order rules
Update the import order rules to alphabetize imports, group the
annotator imports, and remove the newlines between groups.
- Alphabetize imports just makes things tidy and ensures no one ever has
to care about how to order them.
- Define the groups so that the annotator modules, classified as
internal packages by the resolver, group together below external
packages.
- Remove the newlines because they are excessive.
---
.eslintrc.js | 19 +++++++++++++++++--
packages/dom/src/css.ts | 1 -
packages/dom/src/range/match.ts | 2 --
packages/dom/src/text-quote/describe.ts | 1 -
packages/dom/src/text-quote/match.ts | 3 +--
.../dom/test/highlight-range/highlight-range.test.ts | 1 -
packages/dom/test/range/cartesian.test.ts | 1 -
packages/dom/test/text-quote/describe-cases.ts | 1 -
packages/dom/test/text-quote/describe.test.ts | 2 --
packages/dom/test/text-quote/match-cases.ts | 1 -
packages/dom/test/text-quote/match.test.ts | 4 +---
test/data-model.test.ts | 1 -
12 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index 787e984..e21fd31 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -19,7 +19,6 @@
*/
const path = require('path');
-
const babel = require('@babel/core');
// Use the root babel.config.js for module resolution.
@@ -46,7 +45,23 @@ module.exports = {
'import/no-absolute-path': 'error',
'import/no-default-export': 'error',
'import/no-internal-modules': 'error',
- 'import/order': ['error', { 'newlines-between': 'always' }],
+ 'import/order': [
+ 'error',
+ {
+ alphabetize: {
+ order: 'asc',
+ },
+ groups: [
+ 'builtin',
+ 'external',
+ 'internal',
+ 'parent',
+ 'sibling',
+ 'index',
+ ],
+ 'newlines-between': 'never',
+ },
+ ],
'import/unambiguous': 'error',
'prettier/prettier': [
'error',
diff --git a/packages/dom/src/css.ts b/packages/dom/src/css.ts
index c1950cf..be9ff3e 100644
--- a/packages/dom/src/css.ts
+++ b/packages/dom/src/css.ts
@@ -19,7 +19,6 @@
*/
import type { CssSelector, Matcher } from '@annotator/selector';
-
import { ownerDocument } from './owner-document';
export function createCssSelectorMatcher(
diff --git a/packages/dom/src/range/match.ts b/packages/dom/src/range/match.ts
index c7e138a..30990ee 100644
--- a/packages/dom/src/range/match.ts
+++ b/packages/dom/src/range/match.ts
@@ -19,9 +19,7 @@
*/
import type { Matcher, RangeSelector, Selector } from '@annotator/selector';
-
import { ownerDocument } from '../owner-document';
-
import { product } from './cartesian';
export function makeCreateRangeSelectorMatcher(
diff --git a/packages/dom/src/text-quote/describe.ts b/packages/dom/src/text-quote/describe.ts
index e6275b5..4e0e976 100644
--- a/packages/dom/src/text-quote/describe.ts
+++ b/packages/dom/src/text-quote/describe.ts
@@ -20,7 +20,6 @@
import seek from 'dom-seek';
import type { TextQuoteSelector } from '@annotator/selector';
-
import { ownerDocument } from '../owner-document';
export async function describeTextQuote(
diff --git a/packages/dom/src/text-quote/match.ts b/packages/dom/src/text-quote/match.ts
index a4a216f..d076f76 100644
--- a/packages/dom/src/text-quote/match.ts
+++ b/packages/dom/src/text-quote/match.ts
@@ -18,9 +18,8 @@
* under the License.
*/
-import type { Matcher, TextQuoteSelector } from '@annotator/selector';
import seek from 'dom-seek';
-
+import type { Matcher, TextQuoteSelector } from '@annotator/selector';
import { ownerDocument } from '../owner-document';
export function createTextQuoteSelectorMatcher(
diff --git a/packages/dom/test/highlight-range/highlight-range.test.ts b/packages/dom/test/highlight-range/highlight-range.test.ts
index 85a0988..aa81c46 100644
--- a/packages/dom/test/highlight-range/highlight-range.test.ts
+++ b/packages/dom/test/highlight-range/highlight-range.test.ts
@@ -19,7 +19,6 @@
*/
import { assert } from 'chai';
-
import { highlightRange } from '../../src/highlight-range';
import { RangeInfo, hydrateRange, evaluateXPath } from '../utils';
diff --git a/packages/dom/test/range/cartesian.test.ts b/packages/dom/test/range/cartesian.test.ts
index bae6027..1b794dd 100644
--- a/packages/dom/test/range/cartesian.test.ts
+++ b/packages/dom/test/range/cartesian.test.ts
@@ -19,7 +19,6 @@
*/
import { assert } from 'chai';
-
import { product } from '../../src/range/cartesian';
async function* gen1() {
diff --git a/packages/dom/test/text-quote/describe-cases.ts b/packages/dom/test/text-quote/describe-cases.ts
index 142437d..a88732f 100644
--- a/packages/dom/test/text-quote/describe-cases.ts
+++ b/packages/dom/test/text-quote/describe-cases.ts
@@ -19,7 +19,6 @@
*/
import type { TextQuoteSelector } from '@annotator/selector';
-
import { RangeInfo } from '../utils';
export const testCases: {
diff --git a/packages/dom/test/text-quote/describe.test.ts b/packages/dom/test/text-quote/describe.test.ts
index 3d36c4e..25bfd0f 100644
--- a/packages/dom/test/text-quote/describe.test.ts
+++ b/packages/dom/test/text-quote/describe.test.ts
@@ -19,10 +19,8 @@
*/
import { assert } from 'chai';
-
import { describeTextQuote } from '../../src/text-quote/describe';
import { hydrateRange, evaluateXPath } from '../utils';
-
import { testCases } from './describe-cases';
import { testCases as testMatchCases } from './match-cases';
diff --git a/packages/dom/test/text-quote/match-cases.ts b/packages/dom/test/text-quote/match-cases.ts
index 099802c..46ab803 100644
--- a/packages/dom/test/text-quote/match-cases.ts
+++ b/packages/dom/test/text-quote/match-cases.ts
@@ -19,7 +19,6 @@
*/
import type { TextQuoteSelector } from '@annotator/selector';
-
import { RangeInfo } from '../utils';
export const testCases: {
diff --git a/packages/dom/test/text-quote/match.test.ts b/packages/dom/test/text-quote/match.test.ts
index 7d52e15..baba70b 100644
--- a/packages/dom/test/text-quote/match.test.ts
+++ b/packages/dom/test/text-quote/match.test.ts
@@ -19,11 +19,9 @@
*/
import { assert } from 'chai';
-import type { TextQuoteSelector } from '@annotator/selector';
-
+import { TextQuoteSelector } from '@annotator/selector';
import { createTextQuoteSelectorMatcher } from '../../src/text-quote/match';
import { evaluateXPath, RangeInfo } from '../utils';
-
import { testCases } from './match-cases';
const domParser = new window.DOMParser();
diff --git a/test/data-model.test.ts b/test/data-model.test.ts
index 2082d3a..b7fb794 100644
--- a/test/data-model.test.ts
+++ b/test/data-model.test.ts
@@ -22,7 +22,6 @@
import fs from 'fs';
import { URL } from 'url';
-
import Ajv from 'ajv';
import { assert } from 'chai';
import fetch from 'node-fetch';
[incubator-annotator] 10/10: Simplify TypeScript library support
definition
Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit 13b6b351660c7284a35e7e50d96ad889b96fd458
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Sat Sep 19 20:33:04 2020 -0700
Simplify TypeScript library support definition
The base TypeScript configuration already defines the library support.
Don't redefine it in the solution configuration.
---
tsconfig.json | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tsconfig.json b/tsconfig.json
index dac35b3..f250929 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -8,8 +8,5 @@
{ "path": "packages/apache-annotator" },
{ "path": "packages/dom" },
{ "path": "packages/selector" }
- ],
- "compilerOptions": {
- "lib": ["dom", "dom.iterable", "es2018"]
- }
+ ]
}
[incubator-annotator] 03/10: Add meta-package reference to
top-level tsconfig.json solution
Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit 3f1243e6bf73be025ae36250bb1d3b58707f4050
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Sat Sep 19 18:39:00 2020 -0700
Add meta-package reference to top-level tsconfig.json solution
---
tsconfig.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/tsconfig.json b/tsconfig.json
index 7685922..dac35b3 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -5,6 +5,7 @@
"packages/*/test/**/*",
],
"references": [
+ { "path": "packages/apache-annotator" },
{ "path": "packages/dom" },
{ "path": "packages/selector" }
],
[incubator-annotator] 01/10: Autofix lint
Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit 9eb97746989c9f08cacdf76a36d3e6b2208f9c41
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Sat Sep 19 18:38:25 2020 -0700
Autofix lint
---
packages/dom/src/text-quote/describe.ts | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/packages/dom/src/text-quote/describe.ts b/packages/dom/src/text-quote/describe.ts
index 0103cab..e6275b5 100644
--- a/packages/dom/src/text-quote/describe.ts
+++ b/packages/dom/src/text-quote/describe.ts
@@ -76,18 +76,28 @@ function calculateContextForDisambiguation(
// Count how many characters we’d need as a prefix to disqualify this match.
let sufficientPrefixLength = prefix.length + 1;
- const firstChar = (offset: number) => scopeText[offset - sufficientPrefixLength];
- while (firstChar(targetStartIndex) && firstChar(targetStartIndex) === firstChar(matchStartIndex))
+ const firstChar = (offset: number) =>
+ scopeText[offset - sufficientPrefixLength];
+ while (
+ firstChar(targetStartIndex) &&
+ firstChar(targetStartIndex) === firstChar(matchStartIndex)
+ )
sufficientPrefixLength++;
- if (!firstChar(targetStartIndex)) // We reached the start of scopeText; prefix won’t work.
+ if (!firstChar(targetStartIndex))
+ // We reached the start of scopeText; prefix won’t work.
sufficientPrefixLength = Infinity;
// Count how many characters we’d need as a suffix to disqualify this match.
let sufficientSuffixLength = suffix.length + 1;
- const lastChar = (offset: number) => scopeText[offset + sufficientSuffixLength - 1];
- while (lastChar(targetEndIndex) && lastChar(targetEndIndex) === lastChar(matchEndIndex))
+ const lastChar = (offset: number) =>
+ scopeText[offset + sufficientSuffixLength - 1];
+ while (
+ lastChar(targetEndIndex) &&
+ lastChar(targetEndIndex) === lastChar(matchEndIndex)
+ )
sufficientSuffixLength++;
- if (!lastChar(targetEndIndex)) // We reached the end of scopeText; suffix won’t work.
+ if (!lastChar(targetEndIndex))
+ // We reached the end of scopeText; suffix won’t work.
sufficientSuffixLength = Infinity;
// Use either the prefix or suffix, whichever is shortest.
[incubator-annotator] 05/10: Make the build concurrent
Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit 66edfaf92c5650ed3d2f88ba602bb990c82a32a9
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Sat Sep 19 19:53:09 2020 -0700
Make the build concurrent
---
package.json | 13 +++++++------
yarn.lock | 47 +++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 50 insertions(+), 10 deletions(-)
diff --git a/package.json b/package.json
index 2bb36da..ca32ca3 100644
--- a/package.json
+++ b/package.json
@@ -15,15 +15,15 @@
]
},
"scripts": {
- "build": "yarn run build:cjs && yarn run build:esm && yarn run build:misc && yarn run build:types",
- "build:babel": "lerna exec --parallel -- babel -d lib -s inline -x .ts --root-mode upward src",
- "build:cjs": "cross-env BABEL_ENV=cjs yarn build:babel",
- "build:esm": "cross-env BABEL_ENV=esm yarn build:babel --out-file-extension .mjs",
+ "build": "concurrently yarn:build:lib:* yarn:build:misc",
+ "build:lib": "lerna exec --parallel -- babel -d lib -s inline -x .ts --root-mode upward src",
+ "build:lib:cjs": "cross-env BABEL_ENV=cjs yarn build:lib",
+ "build:lib:esm": "cross-env BABEL_ENV=esm yarn build:lib --out-file-extension .mjs",
+ "build:lib:types": "tsc --build",
"build:misc": "lerna exec -- cp ../../LICENSE ../../NOTICE .",
- "build:types": "tsc --build",
"clean": "tsc --build --clean && lerna exec -- rimraf LICENSE NOTICE lib",
"lint": "tsc --build && eslint .",
- "prepare": "yarn run build:types && lerna run prepare",
+ "prepare": "yarn run build:lib:types && lerna run prepare",
"prepublishOnly": "yarn run build",
"start": "yarn run web:server",
"test": "cross-env BABEL_ENV=test nyc mocha packages/**/*.test.ts",
@@ -51,6 +51,7 @@
"babel-plugin-module-resolver": "^4.0.0",
"babel-plugin-preserve-comment-header": "^1.0.1",
"chai": "^4.2.0",
+ "concurrently": "^5.3.0",
"cross-env": "^6.0.3",
"eslint": "^7.5.0",
"eslint-config-prettier": "^6.11.0",
diff --git a/yarn.lock b/yarn.lock
index bc458cf..bd57937 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3230,6 +3230,21 @@ concat-stream@^2.0.0:
readable-stream "^3.0.2"
typedarray "^0.0.6"
+concurrently@^5.3.0:
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-5.3.0.tgz#7500de6410d043c912b2da27de3202cb489b1e7b"
+ integrity sha512-8MhqOB6PWlBfA2vJ8a0bSFKATOdWlHiQlk11IfmQBPaHVP8oP2gsh2MObE6UR3hqDHqvaIvLTyceNW6obVuFHQ==
+ dependencies:
+ chalk "^2.4.2"
+ date-fns "^2.0.1"
+ lodash "^4.17.15"
+ read-pkg "^4.0.1"
+ rxjs "^6.5.2"
+ spawn-command "^0.0.2-1"
+ supports-color "^6.1.0"
+ tree-kill "^1.2.2"
+ yargs "^13.3.0"
+
config-chain@^1.1.11:
version "1.1.12"
resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa"
@@ -3589,6 +3604,11 @@ date-fns@^1.27.2:
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c"
integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==
+date-fns@^2.0.1:
+ version "2.16.1"
+ resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.16.1.tgz#05775792c3f3331da812af253e1a935851d3834b"
+ integrity sha512-sAJVKx/FqrLYHAQeN7VpJrPhagZc9R4ImZIWYRFZaaohR3KzmuK88touwsSwSVT8Qcbd4zoDsnGfX4GFB4imyQ==
+
date-now@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
@@ -8260,6 +8280,15 @@ read-pkg@^3.0.0:
normalize-package-data "^2.3.2"
path-type "^3.0.0"
+read-pkg@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237"
+ integrity sha1-ljYlN48+HE1IyFhytabsfV0JMjc=
+ dependencies:
+ normalize-package-data "^2.3.2"
+ parse-json "^4.0.0"
+ pify "^3.0.0"
+
read@1, read@~1.0.1:
version "1.0.7"
resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4"
@@ -8605,10 +8634,10 @@ run-queue@^1.0.0, run-queue@^1.0.3:
dependencies:
aproba "^1.1.1"
-rxjs@^6.3.3, rxjs@^6.4.0:
- version "6.5.4"
- resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c"
- integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==
+rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.5.2:
+ version "6.6.3"
+ resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552"
+ integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==
dependencies:
tslib "^1.9.0"
@@ -8990,6 +9019,11 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
+spawn-command@^0.0.2-1:
+ version "0.0.2-1"
+ resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0"
+ integrity sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A=
+
spawn-wrap@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-2.0.0.tgz#103685b8b8f9b79771318827aa78650a610d457e"
@@ -9570,6 +9604,11 @@ tr46@^2.0.2:
dependencies:
punycode "^2.1.1"
+tree-kill@^1.2.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc"
+ integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==
+
trim-newlines@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
[incubator-annotator] 04/10: Resolve sources to absolute filenames
for development and testing
Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit 363b3606c43762f028d51dd0de256627dc8ca51c
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Sat Sep 19 19:10:12 2020 -0700
Resolve sources to absolute filenames for development and testing
The source directories of packages are not part of their exports, which
prevents loading these modules relative to an import of the package by
name. Avoid this problem by resolving package name imports to absolute
paths during development and testing.
---
babel.config.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/babel.config.js b/babel.config.js
index 1dddf6a..61a7186 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -18,6 +18,8 @@
* under the License.
*/
+const path = require('path');
+
module.exports = (api) => {
const ENV = api.env();
const DEV = ENV === 'development';
@@ -53,7 +55,10 @@ module.exports = (api) => {
alias: {
...(DEV || TEST
? {
- '^@annotator/(.+)$': '@annotator/\\1/src/index.ts',
+ '^@annotator/([^/]+)$': path.join(
+ __dirname,
+ 'packages/\\1/src/index.ts',
+ ),
}
: null),
// TODO: Remove after babel/babel#8462 ships.
[incubator-annotator] 09/10: Remove extraneous parser option in
ESLint configuration
Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit 6635e1974bd60f9ce1b6d83f2ea775a2ab417f13
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Sat Sep 19 20:38:36 2020 -0700
Remove extraneous parser option in ESLint configuration
The es2020 environment setting already defines the parser version.
---
.eslintrc.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index d0a98be..7249980 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -112,7 +112,6 @@ module.exports = {
'prettier/@typescript-eslint',
],
parserOptions: {
- ecmaVersion: 2020,
project: ['./tsconfig.json', './packages/*/tsconfig.json'],
tsconfigRootDir: __dirname,
},
[incubator-annotator] 08/10: Drop ESLint and TypeScript compilation
target from es2018 to es2017
Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit a5b400a6628403190c356f4ffd3b6c362617cde0
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Sat Sep 19 20:31:32 2020 -0700
Drop ESLint and TypeScript compilation target from es2018 to es2017
Node.js v10 has complete support for es2017, but not quite full support
for es2018.
---
.eslintrc.js | 3 ---
tsconfig.base.json | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index e21fd31..d0a98be 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -91,9 +91,6 @@ module.exports = {
es2017: true,
node: true,
},
- parserOptions: {
- ecmaVersion: 2018,
- },
plugins: ['node'],
rules: {
'no-console': 'off',
diff --git a/tsconfig.base.json b/tsconfig.base.json
index 274039b..e9f79ca 100644
--- a/tsconfig.base.json
+++ b/tsconfig.base.json
@@ -14,6 +14,6 @@
],
"moduleResolution": "node",
"strict": true,
- "target": "es2018"
+ "target": "es2017"
}
}
[incubator-annotator] 02/10: Add directory entries to package
repository metadata
Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit 23e0754abf2db062376abe0f8c9c7fe9210062dd
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Sat Sep 19 18:38:44 2020 -0700
Add directory entries to package repository metadata
---
packages/apache-annotator/package.json | 3 ++-
packages/dom/package.json | 3 ++-
packages/selector/package.json | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/packages/apache-annotator/package.json b/packages/apache-annotator/package.json
index 12684bd..2614ba4 100644
--- a/packages/apache-annotator/package.json
+++ b/packages/apache-annotator/package.json
@@ -5,7 +5,8 @@
"homepage": "https://annotator.apache.org",
"repository": {
"type": "git",
- "url": "https://github.com/apache/incubator-annotator.git"
+ "url": "https://github.com/apache/incubator-annotator.git",
+ "directory": "packages/apache-annotator"
},
"license": "Apache-2.0",
"author": "Apache Software Foundation",
diff --git a/packages/dom/package.json b/packages/dom/package.json
index ace7447..1bb3b2a 100644
--- a/packages/dom/package.json
+++ b/packages/dom/package.json
@@ -5,7 +5,8 @@
"homepage": "https://annotator.apache.org",
"repository": {
"type": "git",
- "url": "https://github.com/apache/incubator-annotator.git"
+ "url": "https://github.com/apache/incubator-annotator.git",
+ "directory": "packages/dom"
},
"license": "Apache-2.0",
"author": "Apache Software Foundation",
diff --git a/packages/selector/package.json b/packages/selector/package.json
index 5283791..c27c215 100644
--- a/packages/selector/package.json
+++ b/packages/selector/package.json
@@ -5,7 +5,8 @@
"homepage": "https://annotator.apache.org",
"repository": {
"type": "git",
- "url": "https://github.com/apache/incubator-annotator.git"
+ "url": "https://github.com/apache/incubator-annotator.git",
+ "directory": "packages/selector"
},
"license": "Apache-2.0",
"author": "Apache Software Foundation",
[incubator-annotator] 06/10: Forbid importing absolute paths
Posted by ra...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit 18a1df07401249317d0a142808f3974db28d0585
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Sat Sep 19 20:26:52 2020 -0700
Forbid importing absolute paths
Importing absolute paths is not portable. It is almost never correct.
---
.eslintrc.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/.eslintrc.js b/.eslintrc.js
index 83621b4..787e984 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -43,6 +43,7 @@ module.exports = {
],
'import/first': 'error',
'import/newline-after-import': 'error',
+ 'import/no-absolute-path': 'error',
'import/no-default-export': 'error',
'import/no-internal-modules': 'error',
'import/order': ['error', { 'newlines-between': 'always' }],