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

Add deploy #367

Merged
merged 13 commits into from
Aug 13, 2022
Merged

Add deploy #367

merged 13 commits into from
Aug 13, 2022

Conversation

ai
Copy link
Member

@ai ai commented Aug 12, 2022

No description provided.

@sashachabin

This comment was marked as resolved.

@ai ai requested a review from sashachabin August 13, 2022 01:09
@sashachabin
Copy link
Collaborator

Small suggestions after review:

  • Rename Server with client-side hot-reloadServer with client-side watcher in README.md. We haven't hot-reload with page refresh
  • Later we will arrange to rename scripts build:regionprebuild:region . I wrote it in issue Auto-update social numbers #353 (comment)

@sashachabin
Copy link
Collaborator

sashachabin commented Aug 13, 2022

Now we can test NODE_ENV=production only by running pnpm ssdeploy run.

This will be enough?

UPD:
I've thought about it a bit. Better we don't work with cross-platform environment variable settings right now.

It will be enough for us to check that the caching logic is working — Issue #374

@sashachabin
Copy link
Collaborator

Thanks for the PR!

P.S. I thought the CI code would be much harder to read. But everything is clear.

@ai
Copy link
Member Author

ai commented Aug 13, 2022

build:regionprebuild:region

npm scripts have special logic for all scripts with pre prefix.

If you run a script, prea will be runned before.

@ai ai merged commit 31e1efe into v2 Aug 13, 2022
@ai ai deleted the chore/deploy branch August 13, 2022 12:48
ai added a commit that referenced this pull request Aug 13, 2022
* Start new project

* Update docs

* Improve dev docs

* Update tools and dependencies

* Move to monorepo

* Add server dir

* Update dependencies

* Add wikipedia article links

* Add browsers icons

* Add test JSON data for client

* Add test backend with v1 format

* Add test JSON data for client

* Fixed wikipedia link

* Remove server start with debugging

* Remove importing JSON only from node_modules

* Remove TypeScript from Lint script

* Update server response format

* Add fetching data from backend

* Add getting data about the region coverage

* Show browserslist erorr messages

* Update default query fixture

* Remove forced `defaults` addition to the output

* Split server and getting information about the browser

* Update client JSON test data

* Update client data fetching

* Add node.js icon and wikipedia link

* Handle all `getBrowsers()` errors

* Remove old png icons

* Remove client fixtures

* Show status 400 if the request contains errors

* Parse region with `browserslist.parse`

* Add 404 error

* Removed unnecessary assignment `GLOBAL_REGION`

* Simplified getting version data

* Getting data about Wikipedia links on client

* Output browserslist and caniuse versions on client

* Add TODO for client side data fetching

* Output server errors in JSON { message: ... }


Output server errors in JSON { message: ... }

* Throw unknown region name getRegionCoverage

* Fix error message output

* Change API endpoint to /api

* Throw unknown region error for dangerous values

* Generate 2 different errors for region

* Add TODO sort version keys by coverage

* Add `uvu` test runner to the project

* Move response generation to another files

* Add integration tests for HTTP server

* Add unit tests for response generation

* Fix regions caniuse path

* Reject `getBrowser()` errors as `Error` instances

* Get `region` from request with fallback from query (MVP)

* Update Node.js and pnpm

* Add support `Node > 0` query

* Fix pnpm cache (#295)

* Fix docs

* Simplify asdf steps

* Fix code indent in docs

* Update the API endpoint URL on the client

* Take region only from GET parameter (#297)

* Remove smart region recognition from a query

* Remove test for deleted smart region recognition

* Create `regions.json` on client's `postinstall` step (#298)

* Moved the client's data to `client/data`

* Add caniuse-lite to the client as devDependency

* Add postinstall step for generate `client/data/regions.json`

* Temporarily handled the ESLint error

* Remove `--ignore-scripts` for `postinstall` working from CI

* Remove unused wikipedia-links.json

* Show creating `region.json` message without `console.info`

* Restored `--ignore-scripts` flag for security (CI)

* Add `<select>` control for region. Fix .size-limit test (#299)

* Add `<select>` control for region in the client

* Get country names from from `window.Intl` (js 5.46kb → 4.46 kB)

* Remove unused DOMContentLoaded handler

* Added an explicit `build:regions` script

* Rename region generator script to`build-regions`

* Add `pnpm start` script for monorepo (#300)

* Added a script `pnpm start` for monorepo

* Show `Server listening on a port` in console

* Update pnpm

* Run all tests in parallel (#301)

* Typo

* Remove old code

* Migrate tests from `uvu` to `node:test` (#304)

* Migrate tests from `uvu` to `node:test`

* Use module `node:assert` with prefix like `node:test'

* Add node: prefix to all node imports

* Update npm dependencies (#307)

* Showing browser usage in the specified region (#309)

* MVP frontend (#306)

* remove reset css

* Add test JSON data for client

* add html content, remove pug

* add basic styles

* fix fixture

* add styles and generation for stats view

* fix eslint

* fix table layout

* Update browserslist 4.21.3

* Change API endpoint to /api

* add connect with backend

* submit form by enter click, refactor js code

* fix colors for dark theme (not final)

* fix show stats functions

* add showing tools versions

* move styles to separate files

* add logos, refactor introduction layout

* better styles for browser stats

* better styles for form

* add browser logos icons

* fix submit form by press enter

* add and_qq icon

* add badges about twitter and github at header

* add correct behaviour for stats placeholder

* add showing errors

* add query links

* add TODO and small fixes

* add the QueryLink component and fix link in the interactivePlaceholder

* add the real documentation and styles for them

* fix display errors

* fix display stats table at small screens

* separate Link component to the file

* add minimum of adaptivity

* remove the fixtures

* add role=presentation for all images

* remove one-letter caa variables

* fix BEM

* refactor project files structure

* code review fix (change way to set css-variables)

* add href for link to supporters

* add text for screen readers

* fix way to connect html and js to data-id attribute

* regenerate lock-file

* change way to hide texts for screen readers

* replace three dots to one symbol

* remove function private market

* remove server/index.js as an artefact after merge

* code review fix

* increase size for size-limit

* Add 3 browser icons

* Fix server URL endpoint

* fix eslint config

* remove comment code form TODO

* fix one-letter css variables

* add alt for the logo

* add link about monospace, monospace

* remove !important from styles

* format js-code

* replace role="presentation" to alt=""

Co-authored-by: Alexander Chabin <[email protected]>

* Update dependencies

* Update pnpm

* Update PostCSS

* Fix incorrect display of UTF-8 characters

* Сhange url when form are submitted and check urk when page are loaded (#321)

* change url when form are submitted and check urk when page are loaded

* rename url parameter (code review)

* handle popstate event

* Add `<select>` and coverage stats output (#303)

* Add `<select>` and coverage stats output

* Replace querySelector by `.class` to `[data-id=*]`

* Increase .size-limit with 5 KB step

* Rename `coverageCounter` to `coverageHeader`

* Remove the results from the `<form>` tag

* Add favicon, .webmanifest, OG and meta-tags (#324)

* Add favicon, .webmanifest, OG and meta-tags

* Optimize favicons

* Optimize browsers icons

* Increase size limit for site icons

* Move site icons to `/public` folder to serve static

* Add cache buster to `apple-touch-icon.png`

* Disable Vite's static convert to `base64`

* Add page `<title>`

* Fix description

* Fix merge conflict

Co-authored-by: Andrey Sitnik <[email protected]>

* Update dependencies

* Add Prettier to pre-commit hook (#329)

* remove initialization functions (close #323) (#326)

* use key name instead of keyCode (close #327) (#330)

Co-authored-by: Andrey Sitnik <[email protected]>

* Improve dx of query links (#333)

* attribute data-query is not require now

* remove attribute data-query in unnecessary places

* Add form loader (#320)

* add loader

* change loader animation function

* change loader animation function

* Add current region to URL (#335)

* handle network and 500 errors (#336)

* Add wikipedia URL to `wikipedia-links` data (#337)

* Add OG image (#325)

* Add `./` for image's path in `assets` and `public` folders

* Clear server error after use query link (#341)

* Improve browsers icons (#340)

* Add cache busters to icons `file.213213123.svg`

* Renamed and moved browsers logos files

* Add a check for the existence of the icon

* Increase size-limit for downloadable files

* Fix hover for query-link and some colors (#334)

* fix hover for query-link and some colors

* fix some typo

* design small fixes

* fix overflow for Article for does not display scrollbar

* Add static files serving to Node.js server (#319)

* Add static files serving to Node.js server

* Сaching in memory `index.html` for 3 min

* Add integrational tests for static requests
Add integrational tests for static requests

* Added a static response from the `/assets` folder

* Set caching `index.html`, remove useless `setInterval`

* Add `.html` and `.webmanifest` mime-types

* Update `sendResponse` functions

* Update `Cache-Control` for requests with cache busters

* Separated `api-` handler from another handlers

* Fix getting 404 and 500 errors in parallel

* Add `.ico` mime type

* Add tests for static files

* Update pnpm monorepo/server scripts

* Create `getFileData` function

* Add `Content-Length` header to responses

* Create script `build-static` for server

* Hot-reload build server start

* Fix running server and client build-watcher parallel

* Update `start`, `production`, `test` scripts

* Add `node:` to imports

* Add `index.html` caching only for production mode

* styles for regions select (#343)

* fix some small bugs (#346)

* Update pnpm

* Update dependencies

* Do not call `pnpm test -r` twice on CI (#347)

* Fix submit bugs. Reset `region` query-parameter (#349)

* Reset wrong `&region` in URL

* Remove form submit on page start

* Fix firefox submit with page reload

* Added tweets about browserlist (#345)

* added tweets

* optimize images

* code review fix

* fix for adaptivity

* increase size limit

* fix for adaptivity

* code review fix

Co-authored-by: Andrey Sitnik <[email protected]>

Co-authored-by: Andrey Sitnik <[email protected]>

* Hide default region from query parameters

* Add hedgehog image (#350)

* add images

* add style fot images

* replace png to svg

* add gaps for hedgehog

* increase size limit

* Update alignment and typography for `toolsVersions` block (#356)

* Use English name in countries list for consistency (#358)

* Fix extra scrolls in the query area (#359)

* Scroll into view by clicking on `queryLink` (#355)

* Show `toolsVersions` caption at the bottom (sticky footer) (#357)

* Update Size Limit and Vite

* fix #361, #354 and some other bugs (#364)

* Change default URL

* Design review fixes (#365)

* fix #361, #354 and some other bugs

* design review fix

* Move assets to components (#368)

* Sort versions by name not popularity (#363)

* Remove double vertical scroll (#370)

* Improve static file server (#369)

* Remove callbacks in `get-file-data.js`

* Add `favicon.ico` to memory cache as `index.html`

* Improve HTTP error handling (#371)

* Add deploy (#367)

* Clean up server from old logic

* Typo

* Clean up scripts for future ssdeploy CLI

* Dockernize application

* Add ssdeploy

* Fix CI

* Fix regions on preview

* Try to fix region build

* Fix client dependencies

* Fix imports

* Add deploy script

* Typo

* Simplify API url

Co-authored-by: Alexander Chabin <[email protected]>
Co-authored-by: Sofi Valitova <[email protected]>
ai added a commit that referenced this pull request Aug 13, 2022
* Clean up server from old logic

* Typo

* Clean up scripts for future ssdeploy CLI

* Dockernize application

* Add ssdeploy

* Fix CI

* Fix regions on preview

* Try to fix region build

* Fix client dependencies

* Fix imports

* Add deploy script

* Typo

* Simplify API url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants