diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7154636..e176317 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,6 +62,50 @@ jobs: popd rm -rf ${NAME} + quoted-description: + runs-on: ubuntu-latest + strategy: + matrix: + # This will be used by the base setup action + python-version: ["3.11"] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Base Setup + uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + + - name: Install dependencies + run: | + python -m pip install "copier>=8.0.0" jinja2-time "pydantic<2.0.0" + + - name: Setup Git + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: Create pure frontend extension + run: | + set -eux + mkdir myextension + python -m copier copy -l -d author_name="My Name" -d description="Let's \"rock and roll\"" -d repository="https://github.com/test/lab-extension" --vcs-ref HEAD --UNSAFE . myextension + pushd myextension + pip install "jupyterlab>=4.0.0,<5" + YARN_ENABLE_IMMUTABLE_INSTALLS=false jlpm + jlpm lint:check + pip install -e . + jupyter labextension develop . --overwrite + jupyter labextension list + jupyter labextension list 2>&1 | grep -ie "myextension.*OK" + python -m jupyterlab.browser_check + + jupyter labextension uninstall myextension + pip uninstall -y myextension jupyterlab + + popd + rm -rf myextension + no-tests: runs-on: ubuntu-latest strategy: diff --git a/template/package.json.jinja b/template/package.json.jinja index 1654800..dd9ffb5 100644 --- a/template/package.json.jinja +++ b/template/package.json.jinja @@ -1,7 +1,7 @@ { "name": "{{ labextension_name }}", "version": "0.1.0", - "description": "{{ project_short_description }}", + "description": "{{ project_short_description | replace('"', '\\"') }}", "keywords": [ "jupyter", "jupyterlab", diff --git a/template/src/index.ts.jinja b/template/src/index.ts.jinja index 5a06c88..c7bdef8 100644 --- a/template/src/index.ts.jinja +++ b/template/src/index.ts.jinja @@ -14,7 +14,7 @@ import { requestAPI } from './handler';{% endif %} */ const plugin: JupyterFrontEndPlugin = { id: '{{ labextension_name }}:plugin', - description: '{{ project_short_description }}', + description: '{{ project_short_description | replace("'", "\\'") }}', autoStart: true,{% if kind.lower() == 'theme' %} requires: [IThemeManager],{% endif %}{% if has_settings %} optional: [ISettingRegistry],{% endif %}