Skip to content

Commit 63f1d78

Browse files
authored
jlab3 compatible release (#2)
1 parent b5cc5da commit 63f1d78

File tree

156 files changed

+6380
-12032
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+6380
-12032
lines changed

.eslintignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
dist
3+
coverage
4+
**/*.d.ts
5+
tests

.eslintrc.js

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
module.exports = {
2+
extends: [
3+
'eslint:recommended',
4+
'plugin:@typescript-eslint/eslint-recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'plugin:prettier/recommended'
7+
],
8+
parser: '@typescript-eslint/parser',
9+
parserOptions: {
10+
project: 'tsconfig.json',
11+
sourceType: 'module'
12+
},
13+
plugins: ['@typescript-eslint'],
14+
rules: {
15+
'@typescript-eslint/naming-convention': [
16+
'error',
17+
{
18+
'selector': 'interface',
19+
'format': ['PascalCase'],
20+
'custom': {
21+
'regex': '^I[A-Z]',
22+
'match': true
23+
}
24+
}
25+
],
26+
"@typescript-eslint/ban-ts-comment": 'off',
27+
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
28+
'@typescript-eslint/no-explicit-any': 'off',
29+
'@typescript-eslint/no-namespace': 'off',
30+
'@typescript-eslint/no-use-before-define': 'off',
31+
'@typescript-eslint/quotes': [
32+
'error',
33+
'single',
34+
{ avoidEscape: true, allowTemplateLiterals: false }
35+
],
36+
curly: ['error', 'all'],
37+
eqeqeq: 'error',
38+
'prefer-arrow-callback': 'error'
39+
}
40+
};

.github/workflows/build.yml

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: main
6+
pull_request:
7+
branches: '*'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Install node
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: '14.x'
19+
- name: Install Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: '3.8'
23+
architecture: 'x64'
24+
25+
26+
- name: Setup pip cache
27+
uses: actions/cache@v2
28+
with:
29+
path: ~/.cache/pip
30+
key: pip-3.8-${{ hashFiles('package.json') }}
31+
restore-keys: |
32+
pip-3.8-
33+
pip-
34+
35+
- name: Get yarn cache directory path
36+
id: yarn-cache-dir-path
37+
run: echo "::set-output name=dir::$(yarn cache dir)"
38+
- name: Setup yarn cache
39+
uses: actions/cache@v2
40+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
41+
with:
42+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
43+
key: yarn-${{ hashFiles('**/yarn.lock') }}
44+
restore-keys: |
45+
yarn-
46+
47+
- name: Install dependencies
48+
run: python -m pip install -U jupyterlab~=3.0 check-manifest
49+
- name: Build the extension
50+
run: |
51+
set -eux
52+
jlpm
53+
jlpm run eslint:check
54+
python -m pip install .
55+
56+
jupyter server extension list 2>&1 | grep -ie "jupyterlab_zethus.*OK"
57+
58+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-zethus.*OK"
59+
python -m jupyterlab.browser_check
60+
61+
check-manifest -v
62+
63+
pip install build
64+
python -m build --sdist
65+
cp dist/*.tar.gz myextension.tar.gz
66+
pip uninstall -y myextension jupyterlab
67+
rm -rf myextension
68+
69+
- uses: actions/upload-artifact@v2
70+
with:
71+
name: myextension-sdist
72+
path: myextension.tar.gz
73+
74+
test_isolated:
75+
needs: build
76+
runs-on: ubuntu-latest
77+
78+
steps:
79+
- name: Checkout
80+
uses: actions/checkout@v2
81+
- name: Install Python
82+
uses: actions/setup-python@v2
83+
with:
84+
python-version: '3.8'
85+
architecture: 'x64'
86+
- uses: actions/download-artifact@v2
87+
with:
88+
name: myextension-sdist
89+
- name: Install and Test
90+
run: |
91+
set -eux
92+
# Remove NodeJS, twice to take care of system and locally installed node versions.
93+
sudo rm -rf $(which node)
94+
sudo rm -rf $(which node)
95+
pip install myextension.tar.gz
96+
pip install jupyterlab
97+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-zethus.*OK"
98+
python -m jupyterlab.browser_check --no-chrome-test

.gitignore

+113-81
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,115 @@
1-
lib/*
1+
*.bundle.*
2+
*.zethus
3+
4+
5+
lib/
26
node_modules/
3-
.node_modules/
4-
built/*
5-
tests/cases/rwc/*
6-
tests/cases/test262/*
7-
tests/cases/perf/*
8-
!tests/cases/webharness/compilerToString.js
9-
test-args.txt
10-
~*.docx
11-
\#*\#
12-
.\#*
13-
tests/baselines/local/*
14-
tests/baselines/local.old/*
15-
tests/services/baselines/local/*
16-
tests/baselines/prototyping/local/*
17-
tests/baselines/rwc/*
18-
tests/baselines/test262/*
19-
tests/baselines/reference/projectOutput/*
20-
tests/baselines/local/projectOutput/*
21-
tests/baselines/reference/testresults.tap
22-
tests/services/baselines/prototyping/local/*
23-
tests/services/browser/typescriptServices.js
24-
src/harness/*.js
25-
src/compiler/diagnosticInformationMap.generated.ts
26-
src/compiler/diagnosticMessages.generated.json
27-
src/parser/diagnosticInformationMap.generated.ts
28-
src/parser/diagnosticMessages.generated.json
29-
rwc-report.html
30-
*.swp
31-
build.json
32-
*.actual
33-
tests/webTestServer.js
34-
tests/webTestServer.js.map
35-
tests/webhost/*.d.ts
36-
tests/webhost/webtsc.js
37-
tests/cases/**/*.js
38-
!tests/cases/docker/*.js/
39-
tests/cases/**/*.js.map
40-
*.config
41-
scripts/debug.bat
42-
scripts/run.bat
43-
scripts/word2md.js
44-
scripts/buildProtocol.js
45-
scripts/ior.js
46-
scripts/authors.js
47-
scripts/configurePrerelease.js
48-
scripts/open-user-pr.js
49-
scripts/open-cherry-pick-pr.js
50-
scripts/processDiagnosticMessages.d.ts
51-
scripts/processDiagnosticMessages.js
52-
scripts/produceLKG.js
53-
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
54-
scripts/generateLocalizedDiagnosticMessages.js
55-
scripts/*.js.map
56-
scripts/typings/
57-
coverage/
58-
internal/
59-
**/.DS_Store
60-
.settings
61-
**/.vs
62-
**/.vscode
63-
!**/.vscode/tasks.json
64-
!tests/cases/projects/projectOption/**/node_modules
65-
!tests/cases/projects/NodeModulesSearch/**/*
66-
!tests/baselines/reference/project/nodeModules*/**/*
67-
.idea
68-
yarn.lock
69-
yarn-error.log
70-
.parallelperf.*
71-
tests/cases/user/*/package-lock.json
72-
tests/cases/user/*/node_modules/
73-
tests/cases/user/*/**/*.js
74-
tests/cases/user/*/**/*.js.map
75-
tests/cases/user/*/**/*.d.ts
76-
!tests/cases/user/zone.js/
77-
!tests/cases/user/bignumber.js/
78-
!tests/cases/user/discord.js/
79-
tests/baselines/reference/dt
80-
.failed-tests
81-
TEST-results.xml
82-
package-lock.json
7+
*.egg-info/
8+
.ipynb_checkpoints
9+
*.tsbuildinfo
10+
jupyterlab_zethus/labextension
11+
12+
# Created by https://www.gitignore.io/api/python
13+
# Edit at https://www.gitignore.io/?templates=python
14+
15+
### Python ###
16+
# Byte-compiled / optimized / DLL files
17+
__pycache__/
18+
*.py[cod]
19+
*$py.class
20+
21+
# C extensions
22+
*.so
23+
24+
# Distribution / packaging
25+
.Python
26+
build/
27+
develop-eggs/
28+
dist/
29+
downloads/
30+
eggs/
31+
.eggs/
32+
lib/
33+
lib64/
34+
parts/
35+
sdist/
36+
var/
37+
wheels/
38+
pip-wheel-metadata/
39+
share/python-wheels/
40+
.installed.cfg
41+
*.egg
42+
MANIFEST
43+
44+
# PyInstaller
45+
# Usually these files are written by a python script from a template
46+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
47+
*.manifest
48+
*.spec
49+
50+
# Installer logs
51+
pip-log.txt
52+
pip-delete-this-directory.txt
53+
54+
# Unit test / coverage reports
55+
htmlcov/
56+
.tox/
57+
.nox/
58+
.coverage
59+
.coverage.*
60+
.cache
61+
nosetests.xml
62+
coverage.xml
63+
*.cover
64+
.hypothesis/
65+
.pytest_cache/
66+
67+
# Translations
68+
*.mo
69+
*.pot
70+
71+
# Scrapy stuff:
72+
.scrapy
73+
74+
# Sphinx documentation
75+
docs/_build/
76+
77+
# PyBuilder
78+
target/
79+
80+
# pyenv
81+
.python-version
82+
83+
# celery beat schedule file
84+
celerybeat-schedule
85+
86+
# SageMath parsed files
87+
*.sage.py
88+
89+
# Spyder project settings
90+
.spyderproject
91+
.spyproject
92+
93+
# Rope project settings
94+
.ropeproject
95+
96+
# Mr Developer
97+
.mr.developer.cfg
98+
.project
99+
.pydevproject
100+
101+
# mkdocs documentation
102+
/site
103+
104+
# mypy
105+
.mypy_cache/
106+
.dmypy.json
107+
dmypy.json
108+
109+
# Pyre type checker
110+
.pyre/
111+
112+
# End of https://www.gitignore.io/api/python
83113

114+
# OSX files
115+
.DS_Store

.prettierignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
**/node_modules
3+
**/lib
4+
**/package.json
5+
jupyterlab-zethus

.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "none",
4+
"arrowParens": "avoid"
5+
}

MANIFEST.in

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
include LICENSE
2+
include README.md
3+
include pyproject.toml
4+
recursive-include jupyter-config *.json
5+
6+
include package.json
7+
include install.json
8+
include ts*.json
9+
include yarn.lock
10+
11+
graft jupyterlab_zethus/labextension
12+
13+
# Javascript files
14+
graft src
15+
graft style
16+
graft schema
17+
prune **/node_modules
18+
prune lib
19+
prune binder
20+
prune zethus
21+
22+
# Patterns to exclude from any directory
23+
global-exclude *~
24+
global-exclude *.pyc
25+
global-exclude *.pyo
26+
global-exclude .git
27+
global-exclude .ipynb_checkpoints

0 commit comments

Comments
 (0)