-
Notifications
You must be signed in to change notification settings - Fork 89
Build with Vite #1045
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
Open
binh-dam-ibigroup
wants to merge
39
commits into
dev
Choose a base branch
from
build-with-vite
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Build with Vite #1045
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
6173347
build(vite): Add basic vite setup.
binh-dam-ibigroup 1548e66
refactor: Fix flow type imports
binh-dam-ibigroup 2fab6d7
build(vite): Restore yaml dependency optimization
binh-dam-ibigroup b325302
refactor(config): Convert require into import.
binh-dam-ibigroup 935cc80
refactor(main): fix reducer import
binh-dam-ibigroup 8ba91b0
build(vite): set dev proxy, don't append dev dt-server URL
binh-dam-ibigroup 4ececc7
refactor: Adjust other NODE_ENV for vite
binh-dam-ibigroup e840dc6
fix(App): Wrap router with app info component
binh-dam-ibigroup 3a7082c
build(vite): Replace process.env.* using config.yml content
binh-dam-ibigroup a9c4bba
build(flow): Skip hermes* modules.
binh-dam-ibigroup 344554a
refactor(index): Update CSS paths
binh-dam-ibigroup 12dd69b
build(vite): Add build script using vite.
binh-dam-ibigroup 93aeab0
refactor(config): Adjust flow exceptions
binh-dam-ibigroup 67d4517
ci: Use node v22
binh-dam-ibigroup e5e306e
refactor: Use different yml file imports for vite and jest.
binh-dam-ibigroup e6c80a4
refactor(config): Move test hack to jest-specific file.
binh-dam-ibigroup f5b0cf9
chore(deps): Upgrade nock to 13.3.1.
binh-dam-ibigroup 20c74e9
refactor: Put back test-specific code
binh-dam-ibigroup 51ed97b
test(map): Remove call to nock.log.
binh-dam-ibigroup 6eb449f
refactor(analytics): Avoid using analytics in tests.
binh-dam-ibigroup d92a6a3
test: attempt to not transform source (should fail)
binh-dam-ibigroup f882bb3
Revert "test: attempt to not transform source (should fail)"
binh-dam-ibigroup b7949f0
refactor(config): Move test process.env to test file.
binh-dam-ibigroup 0e24394
test(ActiveProjectViewer): Make test async bc code is async.
binh-dam-ibigroup 966161a
build: Downgrade nock to 12
binh-dam-ibigroup 05f0290
Revert "test(ActiveProjectViewer): Make test async bc code is async."
binh-dam-ibigroup 8c8a029
test(ActiveProjectViewer): Add missing mocks
binh-dam-ibigroup 43be0eb
build: Return to nock 13
binh-dam-ibigroup 522758e
ci: Update e2e test docker
binh-dam-ibigroup 5d48fb9
ci: Update docker for e2e test
binh-dam-ibigroup 2cb2247
docs: Update dev/build docs [skip ci]
binh-dam-ibigroup ea5635c
build(vite): Add buld info to UI.
binh-dam-ibigroup eea1536
ci(e2e): Update base puppeteer image
binh-dam-ibigroup e8f0d1c
ci(e2e): try to fix puppeteer image
binh-dam-ibigroup bdced5c
build(vite): Add polyfills to support process.nextTick()
binh-dam-ibigroup cf65c36
Revert "ci(e2e): Update base puppeteer image"
binh-dam-ibigroup cc26059
ci: Update docker images
binh-dam-ibigroup ada0c46
ci: update puppeteer image
binh-dam-ibigroup 2807b88
Update image for arm/amd processors
binh-dam-ibigroup File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 22 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| // @flow | ||
|
|
||
| import objectPath from 'object-path' | ||
|
|
||
| // This file is used for jest. | ||
| // The paths below are relative to file lib/common/util/config-resources.js | ||
| // that is replaced with this file for jest, where support for `import '...yml'` syntax does not exist. | ||
|
|
||
| // $FlowFixMe - assume file exists and make flow happy | ||
| const english = require('../../../i18n/english.yml') | ||
| // $FlowFixMe - assume file exists and make flow happy | ||
| const polish = require('../../../i18n/polish.yml') | ||
| // $FlowFixMe - assume file exists and make flow happy | ||
| const german = require('../../../i18n/german.yml') | ||
| // Add additional language files here. | ||
| // E.g., require('../../../i18n/espanol.yml') | ||
|
|
||
| // Note: The GTFS+ file should be required regardless of whether the module is | ||
| // enabled. Otherwise, it will not be loaded properly because the UI depends on | ||
| // the server config from the appinfo endpoint. | ||
| // $FlowFixMe - assume file exists and make flow happy | ||
| const gtfsplus = require('../../../gtfsplus.yml') | ||
| // $FlowFixMe - assume file exists and make flow happy | ||
| const gtfs = require('../../../gtfs.yml') | ||
|
|
||
| const languages = [ | ||
| english, | ||
| polish, | ||
| german | ||
| ] | ||
|
|
||
| // For some weird reason that probably has to do with how yaml files are | ||
| // required in the test environment, the message files are stored with an | ||
| // object key that contains the full path. Therefore, do a little hack to | ||
| // fix this. | ||
| languages.forEach(lang => { | ||
| Object.keys(lang).forEach(key => { | ||
| if (key.indexOf('.') > -1) { | ||
| objectPath.set(lang, key, lang[key]) | ||
| } | ||
| }) | ||
| }) | ||
|
|
||
| if (!process.env.SETTINGS) { | ||
| throw new Error('SETTINGS environment variable not set') | ||
| } | ||
|
|
||
| const extraSettings = JSON.parse(process.env.SETTINGS) | ||
|
|
||
| export default { | ||
| english, | ||
| extraSettings, | ||
| german, | ||
| gtfs, | ||
| gtfsplus, | ||
| polish | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| // @flow | ||
|
|
||
| // Note: The GTFS+ file should be required regardless of whether the module is | ||
| // enabled. Otherwise, it will not be loaded properly because the UI depends on | ||
| // the server config from the appinfo endpoint. | ||
|
|
||
| // $FlowFixMe Not sure why flow is not able to resolve this file. | ||
| import gtfsplus from '../../../gtfsplus.yml' | ||
| // $FlowFixMe Not sure why flow is not able to resolve this file. | ||
| import gtfs from '../../../gtfs.yml' | ||
|
|
||
| // Note: We are not using Vite's glob import feature (import.meta.glob(...)). | ||
| // Flow treats that as a syntax error that cannot be waived. | ||
|
|
||
| // $FlowFixMe Not sure why flow is not able to resolve this file. | ||
| import english from '../../../i18n/english.yml' | ||
| // $FlowFixMe Not sure why flow is not able to resolve this file. | ||
| import polish from '../../../i18n/polish.yml' | ||
| // $FlowFixMe Not sure why flow is not able to resolve this file. | ||
| import german from '../../../i18n/german.yml' | ||
| // Import additional language files here, e.g.: | ||
| // import spanish from '../../../i18n/espanol.yml' | ||
|
|
||
| // Only used in the test environment for now. | ||
| const extraSettings = {} | ||
|
|
||
| export default { | ||
| english, | ||
| extraSettings, | ||
| german, | ||
| gtfs, | ||
| gtfsplus, | ||
| polish | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping this component around in this PR, although it is not clear how it works.