Skip to content

Commit

Permalink
chore: bump to v3.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hueyy committed Jun 14, 2023
1 parent 928fefb commit 27e9800
Show file tree
Hide file tree
Showing 8 changed files with 1,977 additions and 1,846 deletions.
3,749 changes: 1,940 additions & 1,809 deletions package-lock.json

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clerkent",
"version": "3.6.1",
"version": "3.6.2",
"private": true,
"description": "quick search legal search",
"repository": "https://github.com/lacuna-technologies/clerkent.git",
Expand Down Expand Up @@ -41,45 +41,45 @@
]
},
"dependencies": {
"@babel/runtime": "^7.21.5",
"@babel/runtime": "^7.22.5",
"async-mutex": "^0.4.0",
"axios": "^1.4.0",
"axios-cache-interceptor": "^1.0.1",
"axios-cache-interceptor": "^1.2.0",
"cheerio": "^1.0.0-rc.12",
"fuse.js": "^6.6.2",
"leven": "^4.0.0",
"memoizee": "^0.4.15",
"preact": "^10.13.2",
"preact-router": "^4.1.0",
"qs": "^6.11.1",
"react-select": "^5.7.2",
"preact": "^10.15.1",
"preact-router": "^4.1.1",
"qs": "^6.11.2",
"react-select": "^5.7.3",
"rss-parser": "^3.13.0",
"svg-country-flags": "^1.2.10"
},
"devDependencies": {
"@babel/cli": "^7.21.5",
"@babel/core": "^7.21.5",
"@babel/node": "^7.20.7",
"@babel/plugin-transform-react-jsx": "^7.21.5",
"@babel/plugin-transform-runtime": "^7.21.4",
"@babel/preset-env": "^7.21.5",
"@babel/preset-typescript": "^7.21.5",
"@babel/cli": "^7.22.5",
"@babel/core": "^7.22.5",
"@babel/node": "^7.22.5",
"@babel/plugin-transform-react-jsx": "^7.22.5",
"@babel/plugin-transform-runtime": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@testing-library/preact": "^3.2.3",
"@types/jest": "^29.5.1",
"@types/jest": "^29.5.2",
"@types/memoizee": "^0.4.8",
"@types/node": "^18.16.3",
"@types/node": "^20.3.1",
"@types/qs": "^6.9.7",
"@types/sharp": "^0.31.1",
"@types/webpack": "^5.28.1",
"@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.1",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
"autoprefixer": "^10.4.14",
"babel-loader": "^9.1.2",
"clean-webpack-plugin": "^4.0.0",
"codecov": "^3.8.3",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.7.3",
"eslint": "^8.39.0",
"css-loader": "^6.8.1",
"eslint": "^8.42.0",
"eslint-config-preact": "^1.3.0",
"eslint-plugin-disable": "^2.0.3",
"eslint-plugin-import": "^2.27.5",
Expand All @@ -89,29 +89,29 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-sonarjs": "^0.19.0",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"eslint-plugin-unicorn": "^46.0.0",
"eslint-plugin-unicorn": "^47.0.0",
"file-loader": "^6.2.0",
"filemanager-webpack-plugin": "^7.0.0",
"fork-ts-checker-webpack-plugin": "^7.3.0",
"html-webpack-plugin": "^5.5.1",
"html-webpack-plugin": "^5.5.3",
"husky": "^8.0.3",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"lint-staged": "^13.2.2",
"mini-css-extract-plugin": "^2.7.5",
"postcss": "^8.4.23",
"postcss-loader": "^7.3.0",
"mini-css-extract-plugin": "^2.7.6",
"postcss": "^8.4.24",
"postcss-loader": "^7.3.3",
"resolve-url-loader": "^5.0.0",
"sharp": "^0.32.1",
"svg-inline-loader": "^0.8.2",
"tailwindcss": "^3.3.2",
"terser-webpack-plugin": "^5.3.7",
"terser-webpack-plugin": "^5.3.9",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
"tsc-files": "^1.1.3",
"typescript": "^5.0.4",
"typescript": "^5.1.3",
"webextension-polyfill-ts": "^0.26.0",
"webpack": "^5.81.0",
"webpack": "^5.86.0",
"webpack-cli": "^4.10.0",
"wext-manifest-loader": "^3.0.0",
"wext-manifest-webpack-plugin": "^1.2.1"
Expand Down
2 changes: 1 addition & 1 deletion src/ContentScript/DownloadInterceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const interceptLawNetDownloads = async (port: Runtime.Port) => {
if (isLawNet && isLawNetCase){
const downloadButtonSelector = `li.iconPDF > a`
const downloadButton = await waitForElement(downloadButtonSelector, false)
const citationElement = [...document.querySelectorAll(`span.Citation.offhyperlink`)].slice(-1)[0]
const citationElement = [...document.querySelectorAll(`span.Citation.offhyperlink`)].at(-1)
const caseNameElement = document.querySelector(`span.caseTitle`)
const law: Law.Case = {
citation: citationElement.textContent.trim(),
Expand Down
4 changes: 2 additions & 2 deletions src/utils/Finder/CaseCitationFinder/EU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export const findEUCaseCitation = (
): Finder.CaseCitationFinderResult[] => {
const regex = new RegExp(`(${epoRegex.source})|(${cjeuRegex.source})`, `gi`)
const cleanedQuery = query
.replace(new RegExp(`[${String.fromCharCode(8209)}]`, `g`), `-`)
.replace(/case /gi, `C-`)
.replaceAll(new RegExp(`[${String.fromCharCode(8209)}]`, `g`), `-`)
.replaceAll(/case /gi, `C-`)

const matches = [...cleanedQuery.matchAll(regex)]

Expand Down
2 changes: 1 addition & 1 deletion src/utils/Finder/CaseCitationFinder/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const formatAbbrs = (
({ abbr, appendum }) => formatAbbr({ abbr, appendum}),
).join(`|`)

export const cleanVolume = (volumeString: string) => volumeString.replace(/\./g, ``).toLowerCase().trim()
export const cleanVolume = (volumeString: string) => volumeString.replaceAll(`.`, ``).toLowerCase().trim()

export const sortCitationsByVolume = (
abbrsList: { abbr: string, appendum?: string }[],
Expand Down
6 changes: 3 additions & 3 deletions src/utils/Helpers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// eslint-disable-next-line unicorn/better-regex, no-useless-escape
const sanitiseFilename = (fileName: string) => fileName.replace(/[^\d --\.\[\]a-z]|"/gi, ``)
const sanitiseCaseCitation = (citation: string) => citation.replace(/[^\d --[\]a-z]|"/gi, ` `)
const sanitiseFilename = (fileName: string) => fileName.replaceAll(/[^\d --\.\[\]a-z]|"/gi, ``)
const sanitiseCaseCitation = (citation: string) => citation.replaceAll(/[^\d --[\]a-z]|"/gi, ` `)
const debounce = (function_: (...arguments_: any[]) => unknown, timeout = 500) => {
let timer: NodeJS.Timer
return (...arguments_: any[]) => {
Expand All @@ -11,7 +11,7 @@ const debounce = (function_: (...arguments_: any[]) => unknown, timeout = 500) =

const classnames = (...arguments_: string[]) => [...new Set(arguments_)].filter(item => item && item.length > 0).join(` `)

const escapeRegExp = (string: string) => string.replace(/[$()*+.?[\\\]^{|}]/g, `\\$&`)
const escapeRegExp = (string: string) => string.replaceAll(/[$()*+.?[\\\]^{|}]/g, `\\$&`)

const htmlDecode = (input: string) => {
const document_ = new DOMParser().parseFromString(input, `text/html`)
Expand Down
2 changes: 1 addition & 1 deletion src/utils/scraper/EU/CURIA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const parseCaseData = async (data: AxiosResponse[`data`]): Promise<Law.Case[]> =
...(judgmentPDFURL.length > 0 ? [judgmentPDFLink] : []),
...(opinionPDFURL.length > 0 ? [opinionPDFLink] : []),
],
name: name.replace(citation, ``).trim().slice(1).replace(/^[\s-]+/g, ``).trim(),
name: name.replace(citation, ``).trim().slice(1).replaceAll(/^[\s-]+/g, ``).trim(),
}
}).get()
.filter(({ citation }) => Helpers.isCitationValid(citation))
Expand Down
2 changes: 1 addition & 1 deletion src/utils/scraper/EU/EPO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const zeroPad = (number: string, length = 4) => (
)

const getCaseByCitation = async (citation: string): Promise<Law.Case[]> => {
const [prepend, number] = [citation.slice(0,1), citation.slice(1)].map(a => a.replace(/_/g, ``).trim())
const [prepend, number] = [citation.slice(0,1), citation.slice(1)].map(a => a.replaceAll(`_`, ``).trim())
const [caseNumber, year] = number.split(`/`)
const append = `${zeroPad(caseNumber)}/${year}`
const { data } = await Request.post(
Expand Down

0 comments on commit 27e9800

Please sign in to comment.