You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disable sending requests to the server API by default (for stand-alone usage).
Create monorepo for client and server packages.
Minor changes to the package code: syntax and typing
Run lint on all codebase.
Typization. Fix TypeScript types errors (don't use any type).
Minor changes in the package.json and Github Actions
Use Vite for development (includes ESBuild for TypeScript and CSS building and minifying, PostCSS and Rollup for production builds) and simplify package.json dev dependencies.
Set minimal version of Node.js to 16 and use latest build-in NPM version (with workspaces) or Pnpm instead Yarn (outdated).
Remove the express package (use vite preview).
Move tests/ from docs/, and use docs/ directory as built result instead of public/.
Rename package name in package.json from creepjs to creep-js (as example), because there is already a package with same name in the NPM Registry.
Make tree-shakable CommonJS (CJS) and ECMAScript Modules (ESM) exports for client API functions.
Add support for publishing package to the NPM Registry via .github/workspaces.
Major changes to the code
Split the src/**/*.ts file into views and client API functions.
May I create a one pull request with all suggested features?
Best wishes,
Sergey.
The text was updated successfully, but these errors were encountered:
mrauhu
changed the title
Suggestions for improving maintainability
Suggestions for improving maintainability and use the library as a NPM package
Jul 29, 2022
Hey @mrauhu Thank you for the well outlined suggestions.
Let's pause on making all these changes. We do want to avoid creating a fingerprinting library package. The primary goal is only to promote research and education on the subject of browser fingerprinting.
linting, types, etc
Good tips. I will look into this. Just ported the js to ts recently (a work in progress). The goal is to convert all .ts files to strict types (no any or ts-ignore) and split up functions into subdirectories (utils, constants, template, types).
disable default API request
This is on my mind.
package.json
These are all great tips. I will look at each.
/docs is sort of a final release for GitHub pages. public is a commit staging environment for mass browser testing. docs/tests is for playground fingerprinting ideas. I intend to add functional tests soon (Playwright and Jest).
Hello, @abrahamjuliot.
I want to implement best practices in the tooling based on the Vite repository.
The goal is to make it easier for maintainers to participate in the project and allow users use the library as a NPM package.
Checklist
Zero changes to the code
.prettierrc
..editorconfig
and synchronize it with the Prettier standard..gitignore
: add.vscode
and.idea
directories, because we're using Prettier and Editorconfig instead.eslint-plugin-prettier
that enableseslint-config-prettier
instead ofeslint-config-google
(unmaintained).eslint-plugin-only-warn
to downgrade ESLint errors to warnings.lint
script inpackage.json
.Minor changes to the code
Minor changes to the package code: syntax and typing
lint
on all codebase.any
type).Minor changes in the
package.json
and Github Actionspackage.json
dev dependencies.express
package (usevite preview
).tests/
fromdocs/
, and usedocs/
directory as built result instead ofpublic/
.name
inpackage.json
fromcreepjs
tocreep-js
(as example), because there is already a package with same name in the NPM Registry..github/workspaces
.Major changes to the code
src/**/*.ts
file into views and client API functions.Best wishes,
Sergey.
The text was updated successfully, but these errors were encountered: