Skip to content

Commit

Permalink
chore: upgrades and build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wmertens committed Jan 15, 2024
1 parent 6ce6f38 commit 9cd9ed5
Show file tree
Hide file tree
Showing 23 changed files with 2,050 additions and 1,648 deletions.
67 changes: 53 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,14 @@ jobs:
- run: corepack enable

- name: Install NPM Dependencies
run: pnpm install --frozen-lockfile
run: |
# Ensure that the qwik binary gets made
mkdir -p packages/qwik/dist/bindings/
touch packages/qwik/dist/qwik.cjs
pnpm install --frozen-lockfile
- name: Build Packages
run: pnpm tsm scripts/index.ts --tsc --build --cli --api --qwiklabs --set-dist-tag="${{ github.event.inputs.disttag }}"
run: pnpm tsm scripts/index.ts --tsc --build --cli --api --qwiklabs --eslint --platform-binding-wasm-copy --set-dist-tag="${{ github.event.inputs.disttag }}"

- name: Print Qwik Dist Build
run: tree packages/qwik/dist/
Expand Down Expand Up @@ -203,7 +207,11 @@ jobs:

- name: Install NPM Dependencies
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
run: pnpm install --frozen-lockfile
run: |
# Ensure that the qwik binary gets made
mkdir -p packages/qwik/dist/bindings/
touch packages/qwik/dist/qwik.cjs
pnpm install --frozen-lockfile
- uses: jetli/wasm-pack-action@v0.3.0
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
Expand Down Expand Up @@ -311,7 +319,11 @@ jobs:

- name: Install NPM Dependencies
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
run: pnpm install --frozen-lockfile
run: |
# Ensure that the qwik binary gets made
mkdir -p packages/qwik/dist/bindings/
touch packages/qwik/dist/qwik.cjs
pnpm install --frozen-lockfile
- name: Build Platform Binding
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
Expand Down Expand Up @@ -350,7 +362,11 @@ jobs:

- name: Install NPM Dependencies
if: ${{ needs.changes.outputs.insightsbuild == 'true' }}
run: pnpm install --frozen-lockfile
run: |
# Ensure that the qwik binary gets made
mkdir -p packages/qwik/dist/bindings/
touch packages/qwik/dist/qwik.cjs
pnpm install --frozen-lockfile
- name: Build Qwik Insights
if: ${{ needs.changes.outputs.insightsbuild == 'true' }}
Expand Down Expand Up @@ -380,7 +396,11 @@ jobs:

- name: Install NPM Dependencies
if: ${{ needs.changes.outputs.docsbuild == 'true' }}
run: pnpm install --frozen-lockfile
run: |
# Ensure that the qwik binary gets made
mkdir -p packages/qwik/dist/bindings/
touch packages/qwik/dist/qwik.cjs
pnpm install --frozen-lockfile
- name: Build Qwik Docs
if: ${{ needs.changes.outputs.docsbuild == 'true' }}
Expand Down Expand Up @@ -419,13 +439,12 @@ jobs:
if: ${{ needs.changes.outputs.fullbuild == 'true' }}

- name: Install NPM Dependencies
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
run: pnpm install --frozen-lockfile

- name: Create packages/qwik/dist/ directory
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
run: |
# Ensure that the qwik binary gets made
mkdir -p packages/qwik/dist/bindings/
touch packages/qwik/dist/qwik.cjs
pnpm install --frozen-lockfile
- name: Download Build Artifacts
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
Expand Down Expand Up @@ -541,7 +560,11 @@ jobs:
mv builderio-qwiklabs-distribution/vite/* packages/qwik-labs/vite/
- name: Install NPM Dependencies
run: pnpm install --frozen-lockfile
run: |
# Ensure that the qwik binary gets made
mkdir -p packages/qwik/dist/bindings/
touch packages/qwik/dist/qwik.cjs
pnpm install --frozen-lockfile
- name: Commit Build Artifacts
if: ${{ needs.changes.outputs.fullbuild == 'true' && github.event_name == 'push' }}
Expand Down Expand Up @@ -620,7 +643,11 @@ jobs:
- name: Install NPM Dependencies
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
run: pnpm install --frozen-lockfile
run: |
# Ensure that the qwik binary gets made
mkdir -p packages/qwik/dist/bindings/
touch packages/qwik/dist/qwik.cjs
pnpm install --frozen-lockfile
- name: Install Playwright
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
Expand Down Expand Up @@ -657,7 +684,11 @@ jobs:
- run: corepack enable

- name: Install NPM Dependencies
run: pnpm install --frozen-lockfile
run: |
# Ensure that the qwik binary gets made
mkdir -p packages/qwik/dist/bindings/
touch packages/qwik/dist/qwik.cjs
pnpm install --frozen-lockfile
- name: Build core
run: pnpm run build.core
Expand Down Expand Up @@ -750,12 +781,20 @@ jobs:
- run: corepack enable

- name: Install NPM Dependencies
run: pnpm install --frozen-lockfile
run: |
# Ensure that the qwik binary gets made
mkdir -p packages/qwik/dist/bindings/
touch packages/qwik/dist/qwik.cjs
pnpm install --frozen-lockfile
- name: Prettier Check
if: ${{ always() }}
run: pnpm run lint.prettier

- name: Build ESLint
if: ${{ always() }}
run: pnpm tsm scripts/index.ts --eslint

- name: ESLint Check
if: ${{ always() }}
run: pnpm run lint.eslint
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ qwik-app/
/server/
/starters/**/server/
/packages/*/server/
!/packages/qwik/server/
/packages/*/src/styled-system/
todo-express/
target
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@builder.io/partytown": "^0.8.2",
"@builder.io/qwik": "workspace:*",
"@clack/prompts": "^0.7.0",
"@eslint/eslintrc": "^3.0.0",
"@mdx-js/mdx": "2.3.0",
"@microsoft/api-documenter": "^7.23.16",
"@microsoft/api-extractor": "^7.39.1",
Expand All @@ -45,10 +46,10 @@
"@playwright/test": "^1.40.1",
"@types/brotli": "^1.3.4",
"@types/cross-spawn": "^6.0.6",
"@types/eslint": "^8.56.1",
"@types/eslint": "^8.56.2",
"@types/express": "^4.17.21",
"@types/mri": "^1.1.5",
"@types/node": "^20.10.8",
"@types/node": "^20.11.0",
"@types/path-browserify": "^1.0.2",
"@types/prompts": "^2.4.9",
"@types/react": "^18.2.47",
Expand All @@ -69,7 +70,7 @@
"esbuild": "^0.19.11",
"eslint": "^8.56.0",
"eslint-plugin-no-only-tests": "3.1.0",
"eslint-plugin-qwik": "latest",
"eslint-plugin-qwik": "workspace:*",
"execa": "7.2.0",
"express": "4.18.2",
"install": "^0.13.0",
Expand All @@ -81,7 +82,7 @@
"prettier-plugin-jsdoc": "^1.3.0",
"pretty-quick": "^3.1.3",
"prompts": "2.4.2",
"rollup": "3.26.3",
"rollup": "^4.9.5",
"semver": "7.5.4",
"snoop": "^1.0.4",
"source-map": "0.7.4",
Expand Down Expand Up @@ -123,7 +124,7 @@
"build.clean": "rm -rf packages/qwik/dist/ && rm -rf packages/qwik-city/lib/ && rm -rf packages/qwik-city/lib/ && rm -rf packages/docs/dist/ && rm -rf packages/insights/dist/ && rm -rf packages/qwik-labs/lib/ && rm -rf packages/qwik-labs/lib-types/",
"build.cli": "tsm scripts/index.ts --cli --dev",
"build.cli.prod": "tsm scripts/index.ts --cli",
"build.core": "tsm scripts/index.ts --tsc --build --qwikcity --platform-binding-wasm-copy",
"build.core": "tsm scripts/index.ts --tsc --build --qwikcity --api --platform-binding-wasm-copy",
"build.eslint": "tsm scripts/index.ts --eslint",
"build.full": "tsm scripts/index.ts --tsc --tsc-docs --build --supabaseauthhelpers --api --eslint --qwikcity --qwikworker --qwiklabs --qwikreact --qwikauth --cli --platform-binding --wasm",
"build.local": "tsm scripts/index.ts --tsc --tsc-docs --build --supabaseauthhelpers --api --eslint --qwikcity --qwikworker --qwiklabs --qwikreact --qwikauth --cli --platform-binding-wasm-copy",
Expand Down
38 changes: 20 additions & 18 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,45 @@
"@builder.io/qwik-city": "workspace:*",
"@builder.io/qwik-labs": "workspace:*",
"@builder.io/qwik-react": "workspace:*",
"@builder.io/sdk-qwik": "^0.6.2",
"@builder.io/sdk-qwik": "^0.8.1",
"@docsearch/css": "^3.5.2",
"@emotion/react": "^11.11.1",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@modular-forms/qwik": "^0.21.0",
"@mui/material": "^5.14.13",
"@mui/x-data-grid": "^6.16.1",
"@supabase/supabase-js": "2.38.1",
"@types/prismjs": "^1.26.1",
"@modular-forms/qwik": "^0.22.0",
"@mui/material": "^5.15.4",
"@mui/system": "^5.4.1",
"@mui/x-data-grid": "^6.18.7",
"@supabase/supabase-js": "^2.39.3",
"@types/prismjs": "^1.26.3",
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.13",
"@unpic/core": "^0.0.31",
"@unpic/qwik": "^0.0.27",
"@types/react-dom": "^18.2.18",
"@unpic/core": "^0.0.42",
"@unpic/qwik": "^0.0.38",
"algoliasearch": "4.16.0",
"autoprefixer": "^10.4.16",
"fflate": "^0.8.1",
"gray-matter": "4.0.3",
"openai": "^3.3.0",
"postcss": "^8.4.31",
"postcss": "^8.4.33",
"prettier": "^3.1.1",
"prism-themes": "1.9.0",
"prismjs": "1.29.0",
"puppeteer": "^20.9.0",
"puppeteer": "^21.7.0",
"qwik-image": "^0.0.8",
"react": "18.2.0",
"react-dom": "18.2.0",
"rehype-pretty-code": "^0.10.1",
"shiki": "^0.14.5",
"rehype-pretty-code": "^0.12.3",
"shiki": "^0.14.7",
"shikiji": "^0.7.0 || ^0.8.0 || ^0.9.0",
"snarkdown": "^2.0.0",
"tailwindcss": "3.3.3",
"tailwindcss": "^3.4.1",
"tsm": "^2.3.0",
"typescript": "5.3.3",
"undici": "*",
"valibot": "^0.17.1",
"valibot": "^0.25.0",
"vite": "^5.0.11",
"vite-plugin-inspect": "^0.7.42",
"wrangler": "^3.18.0"
"vite-plugin-inspect": "^0.8.1",
"wrangler": "^3.22.4"
},
"engines": {
"node": ">=18.11",
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default defineConfig(async () => {
mdx: {
rehypePlugins: [
[
rehypePrettyCode,
rehypePrettyCode as any,
{
theme: 'dark-plus',
onVisitLine(node: any) {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-qwik/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"qwik"
],
"license": "MIT",
"main": "index.js",
"main": "dist/index.js",
"peerDependencies": {
"eslint": "^8.56.0"
},
Expand Down
13 changes: 6 additions & 7 deletions packages/eslint-plugin-qwik/src/validLexicalScope.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/* eslint-disable no-console */
import { ESLintUtils } from '@typescript-eslint/utils';
import type { Scope } from '@typescript-eslint/utils/dist/ts-eslint-scope';
import * as ESLintUtils from '@typescript-eslint/utils/eslint-utils';
import ts from 'typescript';
import type { Identifier } from 'estree';
import redent from 'redent';
import type { RuleContext } from '@typescript-eslint/utils/dist/ts-eslint';
import type { RuleContext, Scope } from '@typescript-eslint/utils/dist/ts-eslint';
import { QwikEslintExamples } from '../examples';

const createRule = ESLintUtils.RuleCreator(
Expand Down Expand Up @@ -64,10 +63,10 @@ export const validLexicalScope = createRule({
const relevantScopes: Map<any, string> = new Map();
let exports: ts.Symbol[] = [];

function walkScope(scope: Scope) {
function walkScope(scope: Scope.Scope) {
scope.references.forEach((ref) => {
const declaredVariable = ref.resolved;
const declaredScope = ref.resolved?.scope;
const declaredScope = ref.resolved?.scope as Scope.Scope;
if (declaredVariable && declaredScope) {
const variableType = declaredVariable.defs.at(0)?.type;
if (variableType === 'Type') {
Expand All @@ -76,7 +75,7 @@ export const validLexicalScope = createRule({
if (variableType === 'ImportBinding') {
return;
}
let dollarScope: Scope | null = ref.from;
let dollarScope: Scope.Scope | null = ref.from;
let dollarIdentifier: string | undefined;
while (dollarScope) {
dollarIdentifier = relevantScopes.get(dollarScope);
Expand All @@ -96,7 +95,7 @@ export const validLexicalScope = createRule({
}
const identifier = ref.identifier;
const tsNode = esTreeNodeToTSNodeMap.get(identifier);
let ownerDeclared: Scope | null = declaredScope;
let ownerDeclared: Scope.Scope | null = declaredScope;
while (ownerDeclared) {
if (relevantScopes.has(ownerDeclared)) {
break;
Expand Down
22 changes: 11 additions & 11 deletions packages/insights/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"dependencies": {
"@auth/core": "^0.13.0",
"@builder.io/qwik-auth": "0.1.3",
"@libsql/client": "^0.3.5",
"@modular-forms/qwik": "^0.21.0",
"@libsql/client": "^0.3.6",
"@modular-forms/qwik": "^0.22.0",
"@typescript/analyze-trace": "^0.10.1",
"density-clustering": "^1.3.0",
"dotenv": "^16.3.1",
Expand All @@ -18,21 +18,21 @@
"@builder.io/qwik-city": "workspace:*",
"@builder.io/qwik-labs": "workspace:*",
"@builder.io/vite-plugin-macro": "~0.0.7",
"@netlify/edge-functions": "^2.2.0",
"@types/density-clustering": "^1.3.1",
"@types/eslint": "^8.56.1",
"@types/node": "^20.10.8",
"@netlify/edge-functions": "^2.3.0",
"@types/density-clustering": "^1.3.3",
"@types/eslint": "^8.56.2",
"@types/node": "^20.11.0",
"@typescript-eslint/eslint-plugin": "^6.18.1",
"@typescript-eslint/parser": "^6.18.1",
"autoprefixer": "^10.4.16",
"better-sqlite3": "^9.0.0",
"eslint": "^8.56.0",
"eslint-plugin-qwik": "latest",
"netlify-cli": "^15.9.1",
"postcss": "^8.4.31",
"eslint-plugin-qwik": "workspace:*",
"netlify-cli": "^17.13.1",
"postcss": "^8.4.33",
"prettier": "^3.1.1",
"prettier-plugin-tailwindcss": "^0.5.4",
"tailwindcss": "3.3.3",
"prettier-plugin-tailwindcss": "^0.5.11",
"tailwindcss": "^3.4.1",
"typescript": "5.3.3",
"undici": "*",
"vite": "^5.0.11",
Expand Down
2 changes: 2 additions & 0 deletions packages/qwik-city/vite/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// re-export to make TS happy when not using nodenext import resolution
export * from '../lib/vite';
4 changes: 2 additions & 2 deletions packages/qwik-labs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"description": "Qwik Labs - Where you can try the latest Qwik ideas.",
"version": "0.0.1",
"devDependencies": {
"@builder.io/qwik": "1.3.3",
"@builder.io/qwik": "workspace:*",
"@types/eslint": "^8.56.1",
"@types/node": "^20.10.8",
"@typescript-eslint/eslint-plugin": "^6.18.1",
"@typescript-eslint/parser": "^6.18.1",
"eslint": "^8.56.0",
"eslint-plugin-qwik": "latest",
"eslint-plugin-qwik": "workspace:*",
"np": "^8.0.4",
"prettier": "^3.1.1",
"typescript": "5.3.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/qwik-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"license": "MIT",
"main": "./lib/index.qwik.mjs",
"peerDependencies": {
"@builder.io/qwik": "1.3.3",
"@builder.io/qwik": "workspace:*",
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.13",
"react": "18.2.0",
Expand Down
Loading

0 comments on commit 9cd9ed5

Please sign in to comment.