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 848dc3cca7ed48a78905a460fabe1578b7c04063 Author: Randall Leeds <[email protected]> AuthorDate: Sat Apr 3 20:05:32 2021 -0700 Remove main export for the apache-annotator meta-package Reduce the number of different ways to import modules by removing the main export for the apache-annotator meta-package. Consumers can import from apache-annotator/<package> or use the scoped packages in @apache-annotator/<package>, but not from named exports of a main module for the meta-package. This setup provides a nice symmetry to the import styles. --- packages/apache-annotator/package.json | 17 +++-------------- .../apache-annotator/src/{dom/index.ts => dom.ts} | 0 packages/apache-annotator/src/index.ts | 22 ---------------------- .../src/{selector/index.ts => selector.ts} | 0 4 files changed, 3 insertions(+), 36 deletions(-) diff --git a/packages/apache-annotator/package.json b/packages/apache-annotator/package.json index 8b1b7ef..17dffb2 100644 --- a/packages/apache-annotator/package.json +++ b/packages/apache-annotator/package.json @@ -11,22 +11,11 @@ "license": "Apache-2.0", "author": "Apache Software Foundation", "exports": { - ".": { - "import": "./lib/index.mjs", - "require": "./lib/index.js" - }, - "./dom": { - "import": "./lib/dom/index.mjs", - "require": "./lib/dom/index.js" - }, - "./selector": { - "import": "./lib/selector/index.mjs", - "require": "./lib/selector/index.js" + "./*": { + "import": "./lib/*.mjs", + "require": "./lib/*.js" } }, - "main": "./lib/index.js", - "module": "./lib/index.mjs", - "types": "./lib/index.d.ts", "dependencies": { "@apache-annotator/dom": "^0.1.0", "@apache-annotator/selector": "^0.1.0", diff --git a/packages/apache-annotator/src/dom/index.ts b/packages/apache-annotator/src/dom.ts similarity index 100% rename from packages/apache-annotator/src/dom/index.ts rename to packages/apache-annotator/src/dom.ts diff --git a/packages/apache-annotator/src/index.ts b/packages/apache-annotator/src/index.ts deleted file mode 100644 index 98c8279..0000000 --- a/packages/apache-annotator/src/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @license - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export * as dom from '@apache-annotator/dom'; -export * as selector from '@apache-annotator/selector'; diff --git a/packages/apache-annotator/src/selector/index.ts b/packages/apache-annotator/src/selector.ts similarity index 100% rename from packages/apache-annotator/src/selector/index.ts rename to packages/apache-annotator/src/selector.ts
