Skip to content

Commit

Permalink
chore(deps): update dependency vite to v3 (master) (#1444)
Browse files Browse the repository at this point in the history
* chore(deps): update actions/checkout action to v3 (#1431)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency ioredis to v5.2.2 (#1450)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Replace cross-undici-fetch with @whatwg-node/fetch

* chore(deps): update dependency vite to v3

* Fix GraphiQL build

* Go

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
  • Loading branch information
2 people authored and n1ru4l committed Jul 26, 2022
1 parent 2253a0e commit b3649dd
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 148 deletions.
4 changes: 2 additions & 2 deletions examples/sveltekit/__tests__/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let toSkip = false;

describe('SvelteKit integration', () => {
beforeAll(async () => {
console.time('Setup SvelteKit tests');
// console.time('Setup SvelteKit tests');

const nodeVersion = execSync('node -v').toString();
if (nodeVersion.includes('v12')) {
Expand Down Expand Up @@ -49,7 +49,7 @@ describe('SvelteKit integration', () => {
}

// How long it took?
console.timeEnd('Setup SvelteKit tests');
// console.timeEnd('Setup SvelteKit tests');
}, timings.setup.total);

beforeEach(async () => {
Expand Down
2 changes: 1 addition & 1 deletion examples/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"svelte-preprocess": "4.10.7",
"tslib": "2.4.0",
"typescript": "4.7.4",
"vite": "2.9.14"
"vite": "3.0.2"
},
"dependencies": {
"@envelop/graphql-jit": "4.4.0",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"@types/react": "17.0.39",
"@types/react-dom": "18.0.6",
"react": "17.0.2",
"react-dom": "17.0.2"
"react-dom": "17.0.2",
"esbuild": "0.14.50"
}
}
4 changes: 3 additions & 1 deletion packages/graphiql/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
<script type="module">
import * as yogaGraphiQL from './src/bundle.tsx'
const container = window.document.querySelector('#root')
yogaGraphiQL.renderYogaGraphiQL(container)
yogaGraphiQL.renderYogaGraphiQL(container, {
endpoint: '/graphql',
})
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion packages/graphiql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"devDependencies": {
"@types/react": "17.0.39",
"@vitejs/plugin-react": "1.3.2",
"vite": "2.9.14"
"vite": "3.0.2"
},
"dependencies": {
"@graphql-tools/url-loader": "7.13.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/graphiql/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export default defineConfig({
'/graphql': 'http://localhost:4000',
},
},
define: {
'process.env.NODE_ENV': '"production"',
},
build: {
lib: {
entry: path.resolve(__dirname, 'src', 'bundle.tsx'),
Expand All @@ -20,6 +23,7 @@ export default defineConfig({
rollupOptions: {
output: {
/** prevent code-splitting */
inlineDynamicImports: false,
manualChunks: () => '_.js',
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/render-graphiql/scripts/yoga-bundle-string.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { fileURLToPath } from 'url'

const directoryName = path.dirname(fileURLToPath(import.meta.url))
const inputPath = path.resolve(directoryName, '..', '..', 'graphiql', 'dist')
const jsFile = path.resolve(inputPath, 'yoga-graphiql.es.js')
const jsFile = path.resolve(inputPath, 'yoga-graphiql.umd.js')
const cssFile = path.resolve(inputPath, 'style.css')

const outFile = path.resolve(directoryName, '..', 'src', 'graphiql.ts')
Expand Down
4 changes: 2 additions & 2 deletions packages/render-graphiql/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export const renderGraphiQL = (opts?: GraphiQLOptions) => /* HTML */ `
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module">
<script>
${js}
renderYogaGraphiQL(
YogaGraphiQL.renderYogaGraphiQL(
window.document.querySelector('#root'),
${JSON.stringify(opts ?? {})},
)
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"bob-tsm": "^1.0.0",
"concurrently": "^7.0.0",
"cross-env": "^7.0.3",
"esbuild": "^0.14.21",
"esbuild": "0.14.50",
"esbuild-register": "^3.3.2",
"next-remote-watch": "^1.0.0",
"open-cli": "^7.0.1",
Expand Down
150 changes: 12 additions & 138 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit b3649dd

Please sign in to comment.