A reliable test for the extra code needed in analyzer, passing shellcheck
This commit is contained in:
		
							
								
								
									
										18290
									
								
								web/custom-elements.json
									
									
									
									
									
								
							
							
						
						
									
										18290
									
								
								web/custom-elements.json
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										46913
									
								
								web/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										46913
									
								
								web/package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										279
									
								
								web/package.json
									
									
									
									
									
								
							
							
						
						
									
										279
									
								
								web/package.json
									
									
									
									
									
								
							| @ -1,141 +1,142 @@ | ||||
| { | ||||
|     "name": "@goauthentik/web", | ||||
|     "version": "0.0.0", | ||||
|     "private": true, | ||||
|     "license": "MIT", | ||||
|     "scripts": { | ||||
|         "extract-locales": "lit-localize extract", | ||||
|         "build-locales": "node scripts/build-locales.mjs", | ||||
|         "build-locales:build": "lit-localize build", | ||||
|         "build-locales:repair": "prettier --write ./src/locale-codes.ts", | ||||
|         "esbuild:build": "node build.mjs", | ||||
|         "esbuild:build-proxy": "node build.mjs --proxy", | ||||
|         "esbuild:watch": "node build.mjs --watch", | ||||
|         "build": "run-s build-locales esbuild:build", | ||||
|         "build-proxy": "run-s build-locales esbuild:build-proxy", | ||||
|         "watch": "run-s build-locales esbuild:watch", | ||||
|         "lint": "cross-env NODE_OPTIONS='--max_old_space_size=65536' eslint . --max-warnings 0 --fix", | ||||
|         "lint:precommit": "bun scripts/eslint-precommit.mjs", | ||||
|         "lint:spelling": "node scripts/check-spelling.mjs", | ||||
|         "lit-analyse": "lit-analyzer src", | ||||
|         "precommit": "npm-run-all --parallel tsc lit-analyse lint:spelling --sequential lint:precommit prettier", | ||||
|         "prequick": "run-s tsc:execute lit-analyse lint:precommit lint:spelling", | ||||
|         "prettier-check": "prettier --check .", | ||||
|         "prettier": "prettier --write .", | ||||
|         "pseudolocalize": "node scripts/pseudolocalize.mjs", | ||||
|         "tsc:execute": "tsc --noEmit -p .", | ||||
|         "tsc": "run-s build-locales tsc:execute", | ||||
|         "storybook": "storybook dev -p 6006", | ||||
|         "storybook:build": "cross-env NODE_OPTIONS='--max_old_space_size=8192' storybook build", | ||||
|         "storybook:build-import-map": "node scripts/build-storybook-import-maps.mjs" | ||||
|     }, | ||||
|     "dependencies": { | ||||
|         "@codemirror/lang-html": "^6.4.9", | ||||
|         "@codemirror/lang-javascript": "^6.2.2", | ||||
|         "@codemirror/lang-python": "^6.1.6", | ||||
|         "@codemirror/lang-xml": "^6.1.0", | ||||
|         "@codemirror/legacy-modes": "^6.4.0", | ||||
|         "@codemirror/theme-one-dark": "^6.1.2", | ||||
|         "@formatjs/intl-listformat": "^7.5.7", | ||||
|         "@fortawesome/fontawesome-free": "^6.5.2", | ||||
|         "@goauthentik/api": "^2024.4.2-1718378698", | ||||
|         "@lit/context": "^1.1.2", | ||||
|         "@lit/localize": "^0.12.1", | ||||
|         "@lit/reactive-element": "^2.0.4", | ||||
|         "@lit/task": "^1.0.1", | ||||
|         "@open-wc/lit-helpers": "^0.7.0", | ||||
|         "@patternfly/elements": "^3.0.2", | ||||
|         "@patternfly/patternfly": "^4.224.2", | ||||
|         "@sentry/browser": "^8.9.2", | ||||
|         "@webcomponents/webcomponentsjs": "^2.8.0", | ||||
|         "base64-js": "^1.5.1", | ||||
|         "chart.js": "^4.4.3", | ||||
|         "chartjs-adapter-moment": "^1.0.1", | ||||
|         "codemirror": "^6.0.1", | ||||
|         "construct-style-sheets-polyfill": "^3.1.0", | ||||
|         "core-js": "^3.37.1", | ||||
|         "country-flag-icons": "^1.5.12", | ||||
|         "fuse.js": "^7.0.0", | ||||
|         "guacamole-common-js": "^1.5.0", | ||||
|         "lit": "^3.1.4", | ||||
|         "md-front-matter": "^1.0.4", | ||||
|         "mermaid": "^10.9.1", | ||||
|         "rapidoc": "^9.3.4", | ||||
|         "showdown": "^2.1.0", | ||||
|         "style-mod": "^4.1.2", | ||||
|         "ts-pattern": "^5.2.0", | ||||
|         "webcomponent-qr-code": "^1.2.0", | ||||
|         "yaml": "^2.4.5" | ||||
|     }, | ||||
|     "devDependencies": { | ||||
|         "@babel/core": "^7.24.7", | ||||
|         "@babel/plugin-proposal-class-properties": "^7.18.6", | ||||
|         "@babel/plugin-proposal-decorators": "^7.24.7", | ||||
|         "@babel/plugin-transform-private-methods": "^7.24.7", | ||||
|         "@babel/plugin-transform-private-property-in-object": "^7.24.7", | ||||
|         "@babel/plugin-transform-runtime": "^7.24.7", | ||||
|         "@babel/preset-env": "^7.24.7", | ||||
|         "@babel/preset-typescript": "^7.24.7", | ||||
|         "@changesets/cli": "^2.27.5", | ||||
|         "@custom-elements-manifest/analyzer": "^0.10.2", | ||||
|         "@hcaptcha/types": "^1.0.3", | ||||
|         "@jeysal/storybook-addon-css-user-preferences": "^0.2.0", | ||||
|         "@lit/localize-tools": "^0.7.2", | ||||
|         "@rollup/plugin-replace": "^5.0.7", | ||||
|         "@spotlightjs/spotlight": "^2.0.0", | ||||
|         "@storybook/addon-essentials": "^8.1.10", | ||||
|         "@storybook/addon-links": "^8.1.10", | ||||
|         "@storybook/api": "^7.6.17", | ||||
|         "@storybook/blocks": "^8.0.8", | ||||
|         "@storybook/manager-api": "^8.1.10", | ||||
|         "@storybook/web-components": "^8.1.10", | ||||
|         "@storybook/web-components-vite": "^8.1.10", | ||||
|         "@trivago/prettier-plugin-sort-imports": "^4.3.0", | ||||
|         "@types/chart.js": "^2.9.41", | ||||
|         "@types/codemirror": "5.60.15", | ||||
|         "@types/grecaptcha": "^3.0.9", | ||||
|         "@types/guacamole-common-js": "1.5.2", | ||||
|         "@types/showdown": "^2.0.6", | ||||
|         "@typescript-eslint/eslint-plugin": "^7.5.0", | ||||
|         "@typescript-eslint/parser": "^7.5.0", | ||||
|         "babel-plugin-macros": "^3.1.0", | ||||
|         "babel-plugin-tsconfig-paths": "^1.0.3", | ||||
|         "chokidar": "^3.6.0", | ||||
|         "cross-env": "^7.0.3", | ||||
|         "esbuild": "^0.21.5", | ||||
|         "eslint": "^8.57.0", | ||||
|         "eslint-config-google": "^0.14.0", | ||||
|         "eslint-plugin-custom-elements": "0.0.8", | ||||
|         "eslint-plugin-lit": "^1.11.0", | ||||
|         "eslint-plugin-sonarjs": "^0.25.1", | ||||
|         "eslint-plugin-storybook": "^0.8.0", | ||||
|         "github-slugger": "^2.0.0", | ||||
|         "glob": "^10.4.1", | ||||
|         "lit-analyzer": "^2.0.3", | ||||
|         "npm-run-all": "^4.1.5", | ||||
|         "prettier": "^3.3.2", | ||||
|         "pseudolocale": "^2.0.0", | ||||
|         "react": "^18.2.0", | ||||
|         "react-dom": "^18.3.1", | ||||
|         "rollup-plugin-modify": "^3.0.0", | ||||
|         "rollup-plugin-postcss-lit": "^2.1.0", | ||||
|         "storybook": "^8.1.10", | ||||
|         "storybook-addon-mock": "^5.0.0", | ||||
|         "ts-lit-plugin": "^2.0.2", | ||||
|         "tslib": "^2.6.3", | ||||
|         "turnstile-types": "^1.2.1", | ||||
|         "typescript": "^5.4.5", | ||||
|         "vite-tsconfig-paths": "^4.3.2" | ||||
|     }, | ||||
|     "optionalDependencies": { | ||||
|         "@esbuild/darwin-arm64": "^0.21.4", | ||||
|         "@esbuild/linux-amd64": "^0.18.11", | ||||
|         "@esbuild/linux-arm64": "^0.21.4", | ||||
|         "@rollup/rollup-darwin-arm64": "4.18.0", | ||||
|         "@rollup/rollup-linux-arm64-gnu": "4.18.0", | ||||
|         "@rollup/rollup-linux-x64-gnu": "4.18.0" | ||||
|     }, | ||||
|     "engines": { | ||||
|         "node": ">=20" | ||||
|     } | ||||
|   "name": "@goauthentik/web", | ||||
|   "version": "0.0.0", | ||||
|   "private": true, | ||||
|   "license": "MIT", | ||||
|   "scripts": { | ||||
|     "extract-locales": "lit-localize extract", | ||||
|     "build-locales": "node scripts/build-locales.mjs", | ||||
|     "build-locales:build": "lit-localize build", | ||||
|     "build-locales:repair": "prettier --write ./src/locale-codes.ts", | ||||
|     "esbuild:build": "node build.mjs", | ||||
|     "esbuild:build-proxy": "node build.mjs --proxy", | ||||
|     "esbuild:watch": "node build.mjs --watch", | ||||
|     "build": "run-s build-locales esbuild:build", | ||||
|     "build-proxy": "run-s build-locales esbuild:build-proxy", | ||||
|     "watch": "run-s build-locales esbuild:watch", | ||||
|     "lint": "cross-env NODE_OPTIONS='--max_old_space_size=65536' eslint . --max-warnings 0 --fix", | ||||
|     "lint:precommit": "bun scripts/eslint-precommit.mjs", | ||||
|     "lint:spelling": "node scripts/check-spelling.mjs", | ||||
|     "lit-analyse": "lit-analyzer src", | ||||
|     "postinstall": "bash scripts/patch-analyser.sh", | ||||
|     "precommit": "npm-run-all --parallel tsc lit-analyse lint:spelling --sequential lint:precommit prettier", | ||||
|     "prequick": "run-s tsc:execute lit-analyse lint:precommit lint:spelling", | ||||
|     "prettier-check": "prettier --check .", | ||||
|     "prettier": "prettier --write .", | ||||
|     "pseudolocalize": "node scripts/pseudolocalize.mjs", | ||||
|     "tsc:execute": "tsc --noEmit -p .", | ||||
|     "tsc": "run-s build-locales tsc:execute", | ||||
|     "storybook": "storybook dev -p 6006", | ||||
|     "storybook:build": "cross-env NODE_OPTIONS='--max_old_space_size=8192' storybook build", | ||||
|     "storybook:build-import-map": "node scripts/build-storybook-import-maps.mjs" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@codemirror/lang-html": "^6.4.9", | ||||
|     "@codemirror/lang-javascript": "^6.2.2", | ||||
|     "@codemirror/lang-python": "^6.1.6", | ||||
|     "@codemirror/lang-xml": "^6.1.0", | ||||
|     "@codemirror/legacy-modes": "^6.4.0", | ||||
|     "@codemirror/theme-one-dark": "^6.1.2", | ||||
|     "@formatjs/intl-listformat": "^7.5.7", | ||||
|     "@fortawesome/fontawesome-free": "^6.5.2", | ||||
|     "@goauthentik/api": "^2024.4.2-1718378698", | ||||
|     "@lit/context": "^1.1.2", | ||||
|     "@lit/localize": "^0.12.1", | ||||
|     "@lit/reactive-element": "^2.0.4", | ||||
|     "@lit/task": "^1.0.1", | ||||
|     "@open-wc/lit-helpers": "^0.7.0", | ||||
|     "@patternfly/elements": "^3.0.2", | ||||
|     "@patternfly/patternfly": "^4.224.2", | ||||
|     "@sentry/browser": "^8.9.2", | ||||
|     "@webcomponents/webcomponentsjs": "^2.8.0", | ||||
|     "base64-js": "^1.5.1", | ||||
|     "chart.js": "^4.4.3", | ||||
|     "chartjs-adapter-moment": "^1.0.1", | ||||
|     "codemirror": "^6.0.1", | ||||
|     "construct-style-sheets-polyfill": "^3.1.0", | ||||
|     "core-js": "^3.37.1", | ||||
|     "country-flag-icons": "^1.5.12", | ||||
|     "fuse.js": "^7.0.0", | ||||
|     "guacamole-common-js": "^1.5.0", | ||||
|     "lit": "^3.1.4", | ||||
|     "md-front-matter": "^1.0.4", | ||||
|     "mermaid": "^10.9.1", | ||||
|     "rapidoc": "^9.3.4", | ||||
|     "showdown": "^2.1.0", | ||||
|     "style-mod": "^4.1.2", | ||||
|     "ts-pattern": "^5.2.0", | ||||
|     "webcomponent-qr-code": "^1.2.0", | ||||
|     "yaml": "^2.4.5" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@babel/core": "^7.24.7", | ||||
|     "@babel/plugin-proposal-class-properties": "^7.18.6", | ||||
|     "@babel/plugin-proposal-decorators": "^7.24.7", | ||||
|     "@babel/plugin-transform-private-methods": "^7.24.7", | ||||
|     "@babel/plugin-transform-private-property-in-object": "^7.24.7", | ||||
|     "@babel/plugin-transform-runtime": "^7.24.7", | ||||
|     "@babel/preset-env": "^7.24.7", | ||||
|     "@babel/preset-typescript": "^7.24.7", | ||||
|     "@changesets/cli": "^2.27.5", | ||||
|     "@custom-elements-manifest/analyzer": "^0.10.2", | ||||
|     "@hcaptcha/types": "^1.0.3", | ||||
|     "@jeysal/storybook-addon-css-user-preferences": "^0.2.0", | ||||
|     "@lit/localize-tools": "^0.7.2", | ||||
|     "@rollup/plugin-replace": "^5.0.7", | ||||
|     "@spotlightjs/spotlight": "^2.0.0", | ||||
|     "@storybook/addon-essentials": "^8.1.10", | ||||
|     "@storybook/addon-links": "^8.1.10", | ||||
|     "@storybook/api": "^7.6.17", | ||||
|     "@storybook/blocks": "^8.0.8", | ||||
|     "@storybook/manager-api": "^8.1.10", | ||||
|     "@storybook/web-components": "^8.1.10", | ||||
|     "@storybook/web-components-vite": "^8.1.10", | ||||
|     "@trivago/prettier-plugin-sort-imports": "^4.3.0", | ||||
|     "@types/chart.js": "^2.9.41", | ||||
|     "@types/codemirror": "5.60.15", | ||||
|     "@types/grecaptcha": "^3.0.9", | ||||
|     "@types/guacamole-common-js": "1.5.2", | ||||
|     "@types/showdown": "^2.0.6", | ||||
|     "@typescript-eslint/eslint-plugin": "^7.5.0", | ||||
|     "@typescript-eslint/parser": "^7.5.0", | ||||
|     "babel-plugin-macros": "^3.1.0", | ||||
|     "babel-plugin-tsconfig-paths": "^1.0.3", | ||||
|     "chokidar": "^3.6.0", | ||||
|     "cross-env": "^7.0.3", | ||||
|     "esbuild": "^0.21.5", | ||||
|     "eslint": "^8.57.0", | ||||
|     "eslint-config-google": "^0.14.0", | ||||
|     "eslint-plugin-custom-elements": "0.0.8", | ||||
|     "eslint-plugin-lit": "^1.11.0", | ||||
|     "eslint-plugin-sonarjs": "^0.25.1", | ||||
|     "eslint-plugin-storybook": "^0.8.0", | ||||
|     "github-slugger": "^2.0.0", | ||||
|     "glob": "^10.4.1", | ||||
|     "lit-analyzer": "^2.0.3", | ||||
|     "npm-run-all": "^4.1.5", | ||||
|     "prettier": "^3.3.2", | ||||
|     "pseudolocale": "^2.0.0", | ||||
|     "react": "^18.2.0", | ||||
|     "react-dom": "^18.3.1", | ||||
|     "rollup-plugin-modify": "^3.0.0", | ||||
|     "rollup-plugin-postcss-lit": "^2.1.0", | ||||
|     "storybook": "^8.1.10", | ||||
|     "storybook-addon-mock": "^5.0.0", | ||||
|     "ts-lit-plugin": "^2.0.2", | ||||
|     "tslib": "^2.6.3", | ||||
|     "turnstile-types": "^1.2.1", | ||||
|     "typescript": "^5.4.5", | ||||
|     "vite-tsconfig-paths": "^4.3.2" | ||||
|   }, | ||||
|   "optionalDependencies": { | ||||
|     "@esbuild/darwin-arm64": "^0.21.4", | ||||
|     "@esbuild/linux-amd64": "^0.18.11", | ||||
|     "@esbuild/linux-arm64": "^0.21.4", | ||||
|     "@rollup/rollup-darwin-arm64": "4.18.0", | ||||
|     "@rollup/rollup-linux-arm64-gnu": "4.18.0", | ||||
|     "@rollup/rollup-linux-x64-gnu": "4.18.0" | ||||
|   }, | ||||
|   "engines": { | ||||
|     "node": ">=20" | ||||
|   } | ||||
| } | ||||
|  | ||||
							
								
								
									
										23
									
								
								web/scripts/patch-analyser.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								web/scripts/patch-analyser.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| #!/usr/bin/env bash | ||||
|  | ||||
| TARGET="./node_modules/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/handlers.js" | ||||
|  | ||||
| # If the second question mark is not there in this test, put it there. The flags to grep ensure it | ||||
| # will behave correctly on both MacOS and Linux by requiring it to use only the POSIX "basic" | ||||
| # regular expression behavior. | ||||
| # | ||||
|  | ||||
| if ! grep -GL 'node\.name?\.text?\.startsWith' "$TARGET" > /dev/null 2>&1; then | ||||
| patch --forward -V none --no-backup-if-mismatch -p0 $TARGET <<EOF | ||||
| --- a/packages/analyzer/src/features/analyse-phase/creators/handlers.js | ||||
| +++ b/packages/analyzer/src/features/analyse-phase/creators/handlers.js | ||||
| @@ -34,7 +34,7 @@ export function handleModifiers(doc, node) { | ||||
|      } | ||||
|    }); | ||||
|   | ||||
| -  if (node.name?.text.startsWith('#')) { | ||||
| +  if (node.name?.text?.startsWith('#')) { | ||||
|      doc.privacy = 'private'; | ||||
|    } | ||||
| EOF | ||||
| fi | ||||
		Reference in New Issue
	
	Block a user
	 Ken Sternberg
					Ken Sternberg