-
Notifications
You must be signed in to change notification settings - Fork 33
[VET-5931] Upgrade Stardog.js to node 22 #315
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
Merged
Merged
Changes from 29 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
426de4e
[VET-5931] Upgrade Stardog.js to node 22
SpiralP 6fcb8b6
bump node version to 22 in .nvmrc and package.json
SpiralP 1409ace
convert to yarn.lock
SpiralP 3cea131
remove fetch.js
SpiralP 44c83cb
remove fetch polyfill
SpiralP 7203206
cleanup scripts
SpiralP 59150c3
remove husky and lint-staged
SpiralP 34aea36
upgrade prettier and eslint; configure them
SpiralP 44a0ee1
`yarn format`
SpiralP 4836b7c
`npx prettier --write .`
SpiralP 3922e4f
remove querystring, use URLSearchParams
SpiralP 802d767
prettier: avoid using parens
SpiralP e539306
`yarn format`
SpiralP 7870bd3
`npx prettier --write .`
SpiralP fcc7ee5
update circleci config
SpiralP 624392e
eslint fixes
SpiralP 9450b59
convert to use URLSearchParams
SpiralP a392b0f
remove old node-fetch FormData code
SpiralP 7b51de4
upgrade jest to ^28
SpiralP 6c1891b
fix tests
SpiralP 8ca9215
fix file/blob usage
SpiralP 4a2b36f
duplicate jest config for cluster tests
SpiralP 677fc75
fix missing yarn dep warnings
SpiralP 3d673d4
upgrade rollbar
SpiralP 58e4b52
ci: wait for stardog server to be ready before testing
SpiralP edb7157
package.json: set `main` and `browser` fields
SpiralP e418c0b
`npm pkg fix`
SpiralP fce89bf
use encodeURIComponent for url params since URLSearchParams gives + f…
SpiralP 8c049ed
revert some style changes
SpiralP bcde36a
rename to encodeQueryString
SpiralP 3ebdad0
missed a encodeURIComponent
SpiralP 0a293cc
fix test
SpiralP 3b0a89e
remove todo
SpiralP 4582434
run format, docs
anneeb 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,65 +1,42 @@ | ||
| # This config is based partially on one that was auto-generated by CircleCI | ||
| # from our 1.0 config. Some stuff may be superfluous. | ||
| version: 2 | ||
| version: 2.1 | ||
|
|
||
| references: | ||
| working_directory: &working_directory ~/stardog-union/stardog.js | ||
| orbs: | ||
| node: circleci/node@7 | ||
|
|
||
| jobs: | ||
| build: | ||
| working_directory: *working_directory | ||
| shell: /bin/bash --login | ||
| environment: | ||
| CIRCLE_ARTIFACTS: /tmp/circleci-artifacts | ||
| CIRCLE_TEST_REPORTS: /tmp/circleci-test-results | ||
| executors: | ||
| machine: | ||
| machine: | ||
| docker_layer_caching: true | ||
| steps: | ||
| - checkout | ||
| # Prepare for artifact and test results collection equivalent to how it was done on 1.0. | ||
| # These steps could be consolidated, but I left them separate since that was what was generated. | ||
| - run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS | ||
| - run: | ||
| working_directory: *working_directory | ||
| command: echo $LICENSE | base64 --decode > ./stardog-license-key.bin | ||
| - run: | ||
| working_directory: *working_directory | ||
| command: docker login -u $ARTIFACTORY_USERNAME -p $ARTIFACTORY_PASSWORD stardog-eps-docker.jfrog.io | ||
| - run: | ||
| working_directory: *working_directory | ||
| command: docker build -t this/here/starduck ./ | ||
| - run: | ||
| working_directory: *working_directory | ||
| command: docker run --name stargoose -p 127.0.0.1:5820:5820 -d -it this/here/starduck | ||
| # Dependencies | ||
| # Restore the dependency cache | ||
| - restore_cache: | ||
| keys: | ||
| # This branch if available | ||
| - v1-dep-{{ .Branch }}-{{ checksum "package-lock.json" }} | ||
| # Default branch if not | ||
| - v1-dep-master-{{ checksum "package-lock.json" }} | ||
| # Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly | ||
| - v1-dep-{{ checksum "package-lock.json" }} | ||
| - run: if [ -z "${NODE_ENV:-}" ]; then export NODE_ENV=test; fi | ||
| - run: npm install | ||
| # Save dependency cache | ||
| - save_cache: | ||
| key: v1-dep-{{ .Branch }}-{{ checksum "package-lock.json" }} | ||
| paths: | ||
| - ./node_modules | ||
| # Test | ||
| # This would typically be a build job when using workflows, possibly combined with build | ||
| - run: docker ps -a | ||
| - run: docker logs stargoose | ||
| - run: npm test | ||
| # Teardown | ||
| # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each | ||
| # Save test results | ||
| - store_test_results: | ||
| path: /tmp/circleci-test-results | ||
| # Save artifacts | ||
| - store_artifacts: | ||
| path: /tmp/circleci-artifacts | ||
| - store_artifacts: | ||
| path: /tmp/circleci-test-results | ||
| image: ubuntu-2204:current | ||
|
|
||
| workflows: | ||
| build_and_test: | ||
| jobs: | ||
| - node/test: | ||
| name: Test with Node.js 22 | ||
| executor: machine | ||
| pkg-manager: yarn | ||
| setup: | ||
| - node/install: | ||
| install-yarn: true | ||
| node-version: '22' | ||
| - run: | ||
| name: Build and run docker container | ||
| command: | | ||
| echo "$LICENSE" | base64 --decode > ./stardog-license-key.bin | ||
| docker login -u "$ARTIFACTORY_USERNAME" -p "$ARTIFACTORY_PASSWORD" stardog-eps-docker.jfrog.io | ||
| docker build -t this/here/starduck ./ | ||
| docker run --name stargoose -p 127.0.0.1:5820:5820 -d -it this/here/starduck | ||
| post_install_steps: | ||
| - run: | ||
| name: Wait for Stardog server to be ready | ||
| command: yarn run wait-for-server | ||
| - node/run: | ||
| name: Build with Node.js 22 | ||
| executor: machine | ||
| pkg-manager: yarn | ||
| yarn-run: build | ||
| setup: | ||
| - node/install: | ||
| install-yarn: true | ||
| node-version: '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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| /** @type {import('eslint').Linter.BaseConfig} */ | ||
| module.exports = { | ||
| root: true, | ||
| parserOptions: { | ||
| ecmaVersion: 'latest', | ||
| }, | ||
| plugins: ['prettier'], | ||
| extends: [ | ||
| 'airbnb-base', | ||
| 'prettier', | ||
| 'plugin:jest/recommended', | ||
| '@blueprintjs/eslint-config', | ||
| 'plugin:prettier/recommended', | ||
| ], | ||
| rules: { | ||
| curly: ['warn', 'all'], | ||
| 'header/header': 'off', | ||
| 'import/no-mutable-exports': 'off', | ||
| 'import/order': 'off', | ||
| 'import/prefer-default-export': 'off', | ||
| 'jest/expect-expect': ['warn', { assertFunctionNames: ['expect*'] }], | ||
| 'jsx-a11y/anchor-is-valid': 'off', | ||
| 'jsx-a11y/click-events-have-key-events': 'off', | ||
| 'no-console': 'warn', | ||
| 'no-return-await': 'off', | ||
| 'no-underscore-dangle': 'off', | ||
| 'object-curly-spacing': 'error', | ||
| 'prettier/prettier': 'warn', | ||
| radix: 'off', | ||
| 'sort-imports': 'off', | ||
|
|
||
| // TODO remove these: | ||
| 'no-unused-vars': 'off', | ||
| 'prefer-object-spread': 'warn', | ||
| }, | ||
| }; |
This file was deleted.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| lts/carbon | ||
| 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| /** @type {import('jest').Config} */ | ||
| module.exports = { | ||
| setupFilesAfterEnv: ['./jest.setup.js'], | ||
| testRegex: 'test/cluster/.+\\.spec\\.js$', | ||
| }; |
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 |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| /** @type {import('jest').Config} */ | ||
| module.exports = { | ||
| setupTestFrameworkScriptFile: './jest.setup.js', | ||
| setupFilesAfterEnv: ['./jest.setup.js'], | ||
| // don't include subdirs, so we ignore test/cluster/* | ||
| testRegex: 'test/[^/]+\\.spec\\.js$', | ||
| }; |
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
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.
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.
will need to update github settings for pr blocking these 2 tasks, and remove required
build