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/08/04 00:37:39 UTC

[incubator-annotator] branch master updated (ecca786 -> 9984acf)

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 ecca786  Run CI tests on Node.js 14
     new c98dea0  Switch to a solution-style TypeScript configuration
     new 9984acf  Upgrade Travis environment from xenial to bionic

The 2 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:
 .gitignore                                         |  3 ++
 .travis.yml                                        |  1 +
 package.json                                       |  3 +-
 packages/dom/package.json                          |  5 ++--
 .../dom/src/types/cartesian.d.ts                   |  0
 .../dom/src/types/dom-seek.d.ts                    |  0
 packages/dom/tsconfig.json                         |  6 ++++
 packages/selector/package.json                     |  5 ++--
 packages/selector/tsconfig.json                    |  3 ++
 tsconfig.base.json                                 | 16 ++++++++++
 tsconfig.json                                      | 35 +++++-----------------
 11 files changed, 45 insertions(+), 32 deletions(-)
 rename @types/cartesian/index.d.ts => packages/dom/src/types/cartesian.d.ts (100%)
 rename @types/dom-seek/index.d.ts => packages/dom/src/types/dom-seek.d.ts (100%)
 create mode 100644 packages/dom/tsconfig.json
 create mode 100644 packages/selector/tsconfig.json
 create mode 100644 tsconfig.base.json


[incubator-annotator] 02/02: Upgrade Travis environment from xenial to bionic

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 9984acf8c0e49f997667509f75332f9c755bcfc2
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Mon Aug 3 17:34:40 2020 -0700

    Upgrade Travis environment from xenial to bionic
    
    With the switch to bionic, Travis disabled a lot of things by default
    that might improve test image startup times.
---
 .travis.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.travis.yml b/.travis.yml
index 7abf8d7..4996e78 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,4 @@
+dist: bionic
 language: node_js
 node_js:
   - "10"


[incubator-annotator] 01/02: Switch to a solution-style TypeScript 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 c98dea0c21fcd4ab2f50ffeaf04c51ff36a1c167
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Mon Aug 3 17:22:08 2020 -0700

    Switch to a solution-style TypeScript configuration
    
    Switch to a solution-style TypeScript configuration in the root
    directory and add TypeScript configurations to the individual packages.
    
    This change brings a few benefits:
    
    - Each package emits its own type declarations into its path.
    
    - The TypeScript compiler can do incremental builds of the declarations.
    
    - Automatic imports between packages resolve correcly as package imports
      rather than deep imports.
---
 .gitignore                                         |  3 ++
 package.json                                       |  3 +-
 packages/dom/package.json                          |  5 ++--
 .../dom/src/types/cartesian.d.ts                   |  0
 .../dom/src/types/dom-seek.d.ts                    |  0
 packages/dom/tsconfig.json                         |  6 ++++
 packages/selector/package.json                     |  5 ++--
 packages/selector/tsconfig.json                    |  3 ++
 tsconfig.base.json                                 | 16 ++++++++++
 tsconfig.json                                      | 35 +++++-----------------
 10 files changed, 44 insertions(+), 32 deletions(-)

diff --git a/.gitignore b/.gitignore
index c159859..95c3670 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,9 @@
+*.d.ts
+*.d.ts.map
 .nyc_output
 coverage
 node_modules
+tsconfig.tsbuildinfo
 /web/dist
 /packages/*/LICENSE
 /packages/*/NOTICE
diff --git a/package.json b/package.json
index a9496ae..ebc7380 100644
--- a/package.json
+++ b/package.json
@@ -15,11 +15,12 @@
     ]
   },
   "scripts": {
-    "build": "yarn run build:cjs && yarn run build:esm && yarn run build:misc",
+    "build": "yarn run build:cjs && yarn run build:esm && yarn run build:misc && yarn run build:types",
     "build:babel": "lerna exec --parallel -- babel --extensions '.js,.ts' --root-mode upward",
     "build:cjs": "cross-env BABEL_ENV=cjs yarn build:babel -d lib src",
     "build:esm": "cross-env BABEL_ENV=esm yarn build:babel -d esm src",
     "build:misc": "lerna exec -- cp ../../LICENSE ../../NOTICE .",
+    "build:types": "tsc --build",
     "clean": "lerna exec -- rimraf LICENSE NOTICE esm lib",
     "lint": "eslint .",
     "prepare": "lerna run prepare",
diff --git a/packages/dom/package.json b/packages/dom/package.json
index c64f7ce..be12524 100644
--- a/packages/dom/package.json
+++ b/packages/dom/package.json
@@ -9,8 +9,9 @@
   },
   "license": "Apache-2.0",
   "author": "Apache Software Foundation",
-  "main": "lib/index.js",
-  "module": "esm/index.js",
+  "main": "./lib/index.js",
+  "module": "./esm/index.js",
+  "types": "./src/types.d.ts",
   "dependencies": {
     "@babel/runtime-corejs3": "^7.8.7",
     "cartesian": "^1.0.1",
diff --git a/@types/cartesian/index.d.ts b/packages/dom/src/types/cartesian.d.ts
similarity index 100%
rename from @types/cartesian/index.d.ts
rename to packages/dom/src/types/cartesian.d.ts
diff --git a/@types/dom-seek/index.d.ts b/packages/dom/src/types/dom-seek.d.ts
similarity index 100%
rename from @types/dom-seek/index.d.ts
rename to packages/dom/src/types/dom-seek.d.ts
diff --git a/packages/dom/tsconfig.json b/packages/dom/tsconfig.json
new file mode 100644
index 0000000..afffb53
--- /dev/null
+++ b/packages/dom/tsconfig.json
@@ -0,0 +1,6 @@
+{
+  "extends": "../../tsconfig.base.json",
+  "compilerOptions": {
+    "lib": ["dom", "dom.iterable", "esnext"]
+  }
+}
diff --git a/packages/selector/package.json b/packages/selector/package.json
index 2617dad..fc32323 100644
--- a/packages/selector/package.json
+++ b/packages/selector/package.json
@@ -9,8 +9,9 @@
   },
   "license": "Apache-2.0",
   "author": "Apache Software Foundation",
-  "main": "lib/index.js",
-  "module": "esm/index.js",
+  "main": "./lib/index.js",
+  "module": "./esm/index.js",
+  "types": "./src/index.d.ts",
   "dependencies": {
     "@babel/runtime-corejs3": "^7.8.7",
     "core-js": "^3.6.4"
diff --git a/packages/selector/tsconfig.json b/packages/selector/tsconfig.json
new file mode 100644
index 0000000..9536a0f
--- /dev/null
+++ b/packages/selector/tsconfig.json
@@ -0,0 +1,3 @@
+{
+  "extends": "../../tsconfig.base.json"
+}
diff --git a/tsconfig.base.json b/tsconfig.base.json
new file mode 100644
index 0000000..b8b3d12
--- /dev/null
+++ b/tsconfig.base.json
@@ -0,0 +1,16 @@
+{
+  "compilerOptions": {
+    "allowSyntheticDefaultImports": true,
+    "baseUrl": "./",
+    "composite": true,
+    "declaration": true,
+    "declarationMap": true,
+    "downlevelIteration": true,
+    "emitDeclarationOnly": true,
+    "isolatedModules": true,
+    "lib": ["esnext"],
+    "moduleResolution": "node",
+    "strict": true,
+    "target": "es2017"
+  }
+}
diff --git a/tsconfig.json b/tsconfig.json
index 78ff87a..9a05b84 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,30 +1,11 @@
 {
-  "compilerOptions": {
-    "allowSyntheticDefaultImports": true,
-    "baseUrl": ".",
-    "downlevelIteration": true,
-    "isolatedModules": true,
-    "lib": [
-      "dom",
-      "dom.iterable",
-      "esnext",
-    ],
-    "moduleResolution": "node",
-    "noEmit": true,
-    "paths": {
-      "@annotator/*": ["packages/*/src"]
+  "files": [],
+  "references": [
+    {
+      "path": "./packages/dom/tsconfig.json"
     },
-    "strict": true,
-    "target": "es2017",
-    "typeRoots": [
-      "@types",
-      "node_modules/@types"
-    ]
-  },
-  "include": [
-    "@types",
-    "packages/*/src",
-    "packages/*/test",
-    "test"
-  ]
+    {
+      "path": "./packages/selector/tsconfig.json"
+    }
+  ],
 }