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

Upgrade dev tools #512

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: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
yarn run lint-staged
1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ header:
- '*.map.js'
- '*.bundle.js'
- '**/.*'
- '.husky/pre-commit'
- 'binder/postBuild'
- 'binder/start'
- 'CNAME'
Expand Down
19 changes: 19 additions & 0 deletions buildutils/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@lumino/buildutils",
"version": "2.0.0-alpha.7",
"description": "Utilities for building Lumino packages",
"type": "module",
"main": "src/index.js",
"files": [
"src/*"
],
"repository": "https://github.com/jupyterlab/lumino",
"author": "Project Jupyter",
"license": "BSD-3-Clause",
"private": true,
"dependencies": {
"@rollup/plugin-node-resolve": "^15.0.1",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-sourcemaps": "^0.6.3"
}
}
8 changes: 8 additions & 0 deletions buildutils/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/

export { createRollupExampleConfig } from './rollup.examples.config.js';
export { createRollupConfig } from './rollup.src.config.js';
export { createRollupTestConfig } from './rollup.tests.config.js';
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import nodeResolve from '@rollup/plugin-node-resolve';
import styles from 'rollup-plugin-styles';

export const globals = id =>
const globals = id =>
id.indexOf('@lumino/') === 0 ? id.replace('@lumino/', 'lumino_') : id;

export function createRollupConfig(options) {
export function createRollupExampleConfig(options) {
return {
input: './build/index.js',
output: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import nodeResolve from '@rollup/plugin-node-resolve';
import sourcemaps from 'rollup-plugin-sourcemaps';
import postcss from 'rollup-plugin-postcss';

export const globals = id =>
const globals = id =>
id.indexOf('@lumino/') === 0 ? id.replace('@lumino/', 'lumino_') : id;

export function createRollupConfig(options) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import nodeResolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';

export function createRollupConfig(options) {
export function createRollupTestConfig(options) {
return {
input: './lib/index.spec.js',
output: {
Expand Down
6 changes: 3 additions & 3 deletions examples/example-accordionpanel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"@lumino/widgets": "^2.0.0-alpha.6"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"rimraf": "^3.0.2",
"rollup": "^2.77.3",
"rollup": "^3.9.1",
"rollup-plugin-styles": "^4.0.0",
"typescript": "~4.7.3"
"typescript": "~4.9.4"
}
}
8 changes: 8 additions & 0 deletions examples/example-accordionpanel/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/

import { createRollupExampleConfig } from '@lumino/buildutils';
const rollupConfig = createRollupExampleConfig();
export default rollupConfig;
6 changes: 3 additions & 3 deletions examples/example-datagrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"@lumino/widgets": "^2.0.0-alpha.6"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"rimraf": "^3.0.2",
"rollup": "^2.77.3",
"rollup": "^3.9.1",
"rollup-plugin-styles": "^4.0.0",
"typescript": "~4.7.3"
"typescript": "~4.9.4"
}
}
8 changes: 8 additions & 0 deletions examples/example-datagrid/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/

import { createRollupExampleConfig } from '@lumino/buildutils';
const rollupConfig = createRollupExampleConfig();
export default rollupConfig;
4 changes: 2 additions & 2 deletions examples/example-dockpanel-amd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "2.0.0-alpha.6",
"private": true,
"scripts": {
"test": "node ./test/runner.js"
"test": "playwright test"
},
"devDependencies": {
"puppeteer": "^2.1.1"
"@playwright/test": "^1.29.0"
}
}
27 changes: 0 additions & 27 deletions examples/example-dockpanel-amd/test/runner.js

This file was deleted.

30 changes: 30 additions & 0 deletions examples/example-dockpanel-amd/test/runner.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/

import { ConsoleMessage, expect, test } from '@playwright/test';

const URL = `file://${process.cwd()}/index.html`;

test.setTimeout(120000);

test('should load the example', async ({ page }) => {
console.info('Navigating to page:', URL);
let success = true;

const handleMessage = async (msg: ConsoleMessage) => {
if (msg.type() === 'error') {
console.log('Error: ', msg.text());
success = false;
}
};

page.on('console', handleMessage);

await page.goto(URL);

await page.waitForLoadState('networkidle');

expect(success).toEqual(true);
});
4 changes: 2 additions & 2 deletions examples/example-dockpanel-iife/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "2.0.0-alpha.6",
"private": true,
"scripts": {
"test": "node ./test/runner.js"
"test": "playwright test"
},
"devDependencies": {
"puppeteer": "^2.1.1"
"@playwright/test": "^1.29.0"
}
}
27 changes: 0 additions & 27 deletions examples/example-dockpanel-iife/test/runner.js

This file was deleted.

30 changes: 30 additions & 0 deletions examples/example-dockpanel-iife/test/runner.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/

import { ConsoleMessage, expect, test } from '@playwright/test';

const URL = `file://${process.cwd()}/index.html`;

test.setTimeout(120000);

test('should load the example', async ({ page }) => {
console.info('Navigating to page:', URL);
let success = true;

const handleMessage = async (msg: ConsoleMessage) => {
if (msg.type() === 'error') {
console.log('Error: ', msg.text());
success = false;
}
};

page.on('console', handleMessage);

await page.goto(URL);

await page.waitForLoadState('networkidle');

expect(success).toEqual(true);
});
6 changes: 3 additions & 3 deletions examples/example-dockpanel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"@lumino/widgets": "^2.0.0-alpha.6"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"rimraf": "^3.0.2",
"rollup": "^2.77.3",
"rollup": "^3.9.1",
"rollup-plugin-styles": "^4.0.0",
"typescript": "~4.7.3"
"typescript": "~4.9.4"
}
}
8 changes: 8 additions & 0 deletions examples/example-dockpanel/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/

import { createRollupExampleConfig } from '@lumino/buildutils';
const rollupConfig = createRollupExampleConfig();
export default rollupConfig;
6 changes: 3 additions & 3 deletions examples/example-menubar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"@lumino/widgets": "^2.0.0-alpha.6"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"rimraf": "^3.0.2",
"rollup": "^2.77.3",
"rollup": "^3.9.1",
"rollup-plugin-styles": "^4.0.0",
"typescript": "~4.7.3"
"typescript": "~4.9.4"
}
}
8 changes: 8 additions & 0 deletions examples/example-menubar/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/

import { createRollupExampleConfig } from '@lumino/buildutils';
const rollupConfig = createRollupExampleConfig();
export default rollupConfig;
4 changes: 2 additions & 2 deletions examples/example-nested-dockpanel-amd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "2.0.0-alpha.6",
"private": true,
"scripts": {
"test": "node ./test/runner.js"
"test": "playwright test"
},
"devDependencies": {
"puppeteer": "^2.1.1"
"@playwright/test": "^1.29.0"
}
}
27 changes: 0 additions & 27 deletions examples/example-nested-dockpanel-amd/test/runner.js

This file was deleted.

30 changes: 30 additions & 0 deletions examples/example-nested-dockpanel-amd/test/runner.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/

import { ConsoleMessage, expect, test } from '@playwright/test';

const URL = `file://${process.cwd()}/index.html`;

test.setTimeout(120000);

test('should load the example', async ({ page }) => {
console.info('Navigating to page:', URL);
let success = true;

const handleMessage = async (msg: ConsoleMessage) => {
if (msg.type() === 'error') {
console.log('Error: ', msg.text());
success = false;
}
};

page.on('console', handleMessage);

await page.goto(URL);

await page.waitForLoadState('networkidle');

expect(success).toEqual(true);
});
2 changes: 1 addition & 1 deletion notebooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"@babel/preset-typescript": "^7.7.2",
"@types/react": "^16.9.11",
"@types/react-dom": "^16.9.4",
"typescript": "~4.7.3"
"typescript": "~4.9.4"
}
}
Loading