Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(build): uplift Lerna + replace insecure shortid with nanoid + uplift Yeoman-related packages + ESM-ize generator-superset #29419

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/superset-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
- name: generator-superset unit tests
if: steps.check.outputs.frontend
working-directory: ./superset-frontend/packages/generator-superset
run: npx jest
run: npm run test
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions superset-frontend/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ CHANGELOG/
*.geojson
*-topo.json
storybook-static/

/.nx/workspace-data
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// ***********************************************

import rison from 'rison';
import shortid from 'shortid';
import { nanoid } from 'nanoid';
import { interceptChart } from 'cypress/utils';
import { HEALTH_POP_FORM_DATA_DEFAULTS } from './visualizations/shared.helper';

Expand Down Expand Up @@ -71,7 +71,7 @@ describe('Test explore links', () => {
metrics: ['sum__SP_POP_TOTL'],
groupby: ['country_name'],
};
const newChartName = `Test chart [${shortid.generate()}]`;
const newChartName = `Test chart [${nanoid()}]`;

cy.visitChartByParams(formData);
cy.verifySliceSuccess({ waitAlias: '@tableChartData' });
Expand Down Expand Up @@ -109,8 +109,8 @@ describe('Test explore links', () => {

it('Test chart save as and add to new dashboard', () => {
const chartName = 'Growth Rate';
const newChartName = `${chartName} [${shortid.generate()}]`;
const dashboardTitle = `Test dashboard [${shortid.generate()}]`;
const newChartName = `${chartName} [${nanoid()}]`;
const dashboardTitle = `Test dashboard [${nanoid()}]`;

cy.visitChartByName(chartName);
cy.verifySliceSuccess({ waitAlias: '@chartData' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import * as shortid from 'shortid';
import { nanoid } from 'nanoid';
import { selectResultsTab, assertSQLLabResultsAreEqual } from './sqllab.helper';

function parseClockStr(node: JQuery) {
Expand Down Expand Up @@ -86,7 +86,7 @@ describe('SqlLab query panel', () => {

const query =
'SELECT ds, gender, name, num FROM main.birth_names ORDER BY name LIMIT 3';
const savedQueryTitle = `CYPRESS TEST QUERY ${shortid.generate()}`;
const savedQueryTitle = `CYPRESS TEST QUERY ${nanoid()}`;

// we will assert that the results of the query we save, and the saved query are the same
let initialResultsTable: HTMLElement | null = null;
Expand Down
45 changes: 21 additions & 24 deletions superset-frontend/cypress-base/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion superset-frontend/cypress-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"querystringify": "^2.2.0",
"react-dom": "^16.13.0",
"rison": "^0.1.1",
"shortid": "^2.2.15"
"nanoid": "^5.0.7"
},
"devDependencies": {
"@types/querystringify": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module.exports = {
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
snapshotSerializers: ['@emotion/jest/enzyme-serializer'],
transformIgnorePatterns: [
'node_modules/(?!d3-(interpolate|color)|remark-gfm|markdown-table|micromark-*.|decode-named-character-reference|character-entities|mdast-util-*.|unist-util-*.|ccount|escape-string-regexp)',
'node_modules/(?!d3-(interpolate|color)|remark-gfm|markdown-table|micromark-*.|decode-named-character-reference|character-entities|mdast-util-*.|unist-util-*.|ccount|escape-string-regexp|nanoid)',
],
globals: {
__DEV__: true,
Expand Down
5 changes: 2 additions & 3 deletions superset-frontend/lerna.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"lerna": "3.2.1",
"npmClient": "npm",
"packages": ["packages/*", "plugins/*", "src/setup/*"],
"useWorkspaces": true,
"version": "0.18.25",
"ignoreChanges": [
"**/*.md",
Expand All @@ -19,5 +17,6 @@
"message": "chore(superset-ui): publish %s",
"exact": true
}
}
},
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
Loading
Loading