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

Escape quotes in description as appropriate #57

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
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion template/package.json.jinja
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "{{ labextension_name }}",
"version": "0.1.0",
"description": "{{ project_short_description }}",
"description": "{{ project_short_description | replace('"', '\\"') }}",
"keywords": [
"jupyter",
"jupyterlab",
Expand Down
2 changes: 1 addition & 1 deletion template/src/index.ts.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { requestAPI } from './handler';{% endif %}
*/
const plugin: JupyterFrontEndPlugin<void> = {
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 %}
Expand Down
Loading