chore: upgrade to npm 7 and superset-ui 0.17.9 (#13100)

This commit is contained in:
Jesse Yang 2021-02-15 09:45:29 -10:00 committed by GitHub
parent cc9103b0e2
commit c9f76d58f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 55664 additions and 79 deletions

View File

@ -42,6 +42,10 @@ little bit helps, and credit will always be given.
- [Merging](#merging)
- [Post-merge Responsibility](#post-merge-responsibility)
- [Design Guidelines](#design-guidelines)
- [Capitalization guidelines](#capitalization-guidelines)
- [Sentence case](#sentence-case)
- [How to refer to UI elements](#how-to-refer-to-ui-elements)
- [\*\*Exceptions to sentence case:](#exceptions-to-sentence-case)
- [Managing Issues and PRs](#managing-issues-and-prs)
- [Reporting a Security Vulnerability](#reporting-a-security-vulnerability)
- [Revert Guidelines](#revert-guidelines)
@ -76,6 +80,7 @@ little bit helps, and credit will always be given.
- [Translating](#translating)
- [Enabling language selection](#enabling-language-selection)
- [Extracting new strings for translation](#extracting-new-strings-for-translation)
- [Updating language files](#updating-language-files)
- [Creating a new language dictionary](#creating-a-new-language-dictionary)
- [Tips](#tips)
- [Adding a new datasource](#adding-a-new-datasource)
@ -259,9 +264,11 @@ Finally, never submit a PR that will put master branch in broken state. If the P
### Capitalization guidelines
#### Sentence case
Use sentence-case capitalization for everything in the UI (except these **).
Use sentence-case capitalization for everything in the UI (except these \*\*).
Sentence case is predominantly lowercase. Capitalize only the initial character of the first word, and other words that require capitalization, like:
- **Proper nouns.** Objects in the product _are not_ considered proper nouns e.g. dashboards, charts, saved queries etc. Proprietary feature names eg. SQL Lab, Preset Manager _are_ considered proper nouns
- **Acronyms** (e.g. CSS, HTML)
- When referring to **UI labels that are themselves capitalized** from sentence case (e.g. page titles - Dashboards page, Charts page, Saved queries page, etc.)
@ -272,10 +279,12 @@ Title case: "A Dog Takes a Walk in Paris"
Sentence case: "A dog takes a walk in Paris"
**Why sentence case?**
- Its generally accepted as the quickest to read
- Its the easiest form to distinguish between common and proper nouns
#### How to refer to UI elements
When writing about a UI element, use the same capitalization as used in the UI.
For example, if an input field is labeled “Name” then you refer to this as the “Name input field”. Similarly, if a button has the label “Save” in it, then it is correct to refer to the “Save button”.
@ -293,7 +302,7 @@ Often a product page will have the same title as the objects it contains. In thi
- Queries that you save will appear on the Saved queries page
- Create custom queries in SQL Lab then create dashboards
#### **Exceptions to sentence case:
#### \*\*Exceptions to sentence case:
- Input labels, buttons and UI tabs are all caps
- User input values (e.g. column names, SQL Lab tab names) should be in their original case
@ -464,7 +473,7 @@ Frontend assets (TypeScript, JavaScript, CSS, and images) must be compiled in or
##### nvm and node
First, be sure you are using recent versions of NodeJS and npm. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage your node environment:
First, be sure you are using recent versions of Node.js and npm. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage your node environment:
```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash
@ -476,6 +485,12 @@ nvm use
For those interested, you may also try out [avn](https://github.com/nvm-sh/nvm#deeper-shell-integration) to automatically switch to the node version that is required to run Superset frontend.
We have upgraded our `package-lock.json` to use `lockfileversion: 2` from npm 7, so please make sure you have installed npm 7, too:
```bash
npm install -g npm@7
```
#### Install dependencies
Install third-party dependencies listed in `package.json` via:
@ -837,7 +852,7 @@ To convert all PO files to formatted JSON files you can use the `po2json.sh` scr
```
If you get errors running `po2json`, you might be running the Ubuntu package with the same
name, rather than the NodeJS package (they have a different format for the arguments). If
name, rather than the Node.js package (they have a different format for the arguments). If
there is a conflict, you may need to update your `PATH` environment variable or fully qualify
the executable path (e.g. `/usr/local/bin/po2json` instead of `po2json`).
If you get a lot of `[null,***]` in `messages.json`, just delete all the `null,`.
@ -895,6 +910,9 @@ yarn build
Then use `npm link` to create symlinks of the plugins/superset-ui packages you want to edit in `superset-frontend/node_modules`:
```bash
# Since npm 7, you have to install plugin dependencies separately, too
cd ../../superset-ui/plugins/[PLUGIN NAME] && npm install --legacy-peer-deps
cd superset/superset-frontend
npm link ../../superset-ui/plugins/[PLUGIN NAME]

View File

@ -47,6 +47,9 @@ RUN cd /app \
######################################################################
FROM node:12 AS superset-node
ARG NPM_VER=7
RUN npm install -g npm@${NPM_VER}
ARG NPM_BUILD_CMD="build"
ENV BUILD_CMD=${NPM_BUILD_CMD}

File diff suppressed because it is too large Load Diff

View File

@ -57,7 +57,7 @@
],
"engines": {
"node": ">= 12.18.3 < 13",
"npm": ">= 6.14.8 < 7"
"npm": "^7.5.4"
},
"homepage": "https://superset.apache.org/",
"dependencies": {