Ghost/apps/admin-x-settings/package.json
Simon Backx e5f644c27f
🐛 Fixed contain/starts/endsWith filters with /, _ or % in them (#19015)
fixes GRO-25

Updated @tryghost/nql to 0.12.0 and other packages that depend on it

1. SQLite: when a filter string contains /.

When we use a NQL contain/starts/endsWith filter that contains a slash,
underlyingly the whole filter will get converted to a MongoDB query, in
which we just use a regexp to represent the filter. In here we will
escape the slash: \/ as expected in a regexp. Later when we convert this
MongoDB query back to knex/SQL, we use a SQL LIKE query. Currently we
don't remove the escaping here for a normal slash. MySQL seems to ignore
this (kinda incorrect). SQLite doesn't like it, and this breaks queries
on SQLite that use slashes. The solution here is simple: remove the
backslash escaping when converting the regexp to LIKE, just like we do
with other special regexp characters.

2. We don't escape % and _, which have a special meaning in LIKE queries

Usage of % and _ is now as expected and doesn't have the special SQL
meaning anymore.
2023-11-16 09:35:20 +00:00

83 lines
2.4 KiB
JSON

{
"name": "@tryghost/admin-x-settings",
"version": "0.0.20",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/TryGhost/Ghost/tree/main/packages/admin-x-settings"
},
"author": "Ghost Foundation",
"files": [
"LICENSE",
"README.md",
"dist/"
],
"main": "./dist/admin-x-settings.umd.cjs",
"module": "./dist/admin-x-settings.js",
"exports": {
".": {
"import": "./dist/admin-x-settings.js",
"require": "./dist/admin-x-settings.umd.cjs"
}
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"scripts": {
"dev": "vite build --watch",
"dev:start": "vite",
"build": "tsc && vite build",
"lint": "yarn run lint:js",
"lint:js": "eslint --ext .js,.ts,.cjs,.tsx --cache src test",
"test:unit": "yarn nx build && vitest run",
"test:acceptance": "NODE_OPTIONS='--experimental-specifier-resolution=node --no-warnings' VITE_TEST=true playwright test",
"test:acceptance:slowmo": "TIMEOUT=100000 PLAYWRIGHT_SLOWMO=100 yarn test:acceptance --headed",
"test:acceptance:full": "ALL_BROWSERS=1 yarn test:acceptance",
"preview": "vite preview"
},
"dependencies": {
"@codemirror/lang-html": "^6.4.5",
"@tryghost/color-utils": "0.2.0",
"@tryghost/limit-service": "^1.2.10",
"@tryghost/nql": "0.12.0",
"@tryghost/timezone-data": "0.4.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"validator": "7.2.0"
},
"devDependencies": {
"@playwright/test": "1.38.1",
"@tryghost/admin-x-design-system": "0.0.0",
"@tryghost/admin-x-framework": "0.0.0",
"@types/react": "18.2.37",
"@types/react-dom": "18.2.15",
"@types/validator": "13.11.6",
"@vitejs/plugin-react": "4.1.1",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-refresh": "0.4.3",
"eslint-plugin-tailwindcss": "3.13.0",
"stylelint": "15.10.3",
"vite": "4.5.0",
"vite-plugin-css-injected-by-js": "^3.3.0",
"vite-plugin-svgr": "3.3.0",
"vitest": "0.34.3"
},
"nx": {
"targets": {
"build": {
"dependsOn": [
"build",
{"projects": ["@tryghost/admin-x-design-system", "@tryghost/admin-x-framework"], "target": "build"}
]
},
"test:acceptance": {
"dependsOn": [
"test:acceptance",
{"projects": ["@tryghost/admin-x-design-system", "@tryghost/admin-x-framework"], "target": "build"}
]
}
}
}
}