diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23b6e4cdb..2b4f0c773 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} - run: echo ${{ github.event.number }} > ./pr-number.txt - - run: pnpm turbo build + - run: pnpm turbo build build:prod # Used for faster deploy so we don't need to checkout the repo - uses: actions/upload-artifact@v4 with: @@ -64,6 +64,7 @@ jobs: - uses: wyvox/action@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} + - run: pnpm build - run: pnpm lint ############################################################## diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index efa6753fb..7eff36155 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -77,7 +77,7 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: wyvox/action-setup-pnpm@v3 - - run: pnpm turbo build + - run: pnpm turbo build:prod - uses: actions/upload-artifact@v4 with: name: deploy-prep-dist diff --git a/.github/workflows/preview-embroider-upgrade.yml b/.github/workflows/preview-embroider-upgrade.yml deleted file mode 100644 index 616eca442..000000000 --- a/.github/workflows/preview-embroider-upgrade.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Preview Embroider Upgrade -on: - workflow_dispatch: - schedule: - # Runs "at minute 0 minutes past midnight" (see https://crontab.guru) - - cron: '0 0 * * *' - -env: - branch: "preview-embroider-upgrade" - title: "[Unstable] Preview embroider upgrade" - body: | - Automated and continuously updated PR (nightly via cron) - _Do not merge_ - commit: "Update all embroider deps to the unstable version (main)" - -jobs: - update_unstable_branch: - name: Update Unstable Branch - runs-on: ubuntu-latest - timeout-minutes: 5 - - steps: - - uses: actions/checkout@v4 - - uses: wyvox/action-setup-pnpm@v3 - - run: npx ember-apply@latest unstable-embroider - - run: pnpm install --fix-lockfile --frozen-lockfile=false - - uses: peter-evans/create-pull-request@v7 - with: - # A PAT is required to trigger further workflows - token: ${{ secrets.WORKFLOW_TOKEN }} - commit-message: ${{ env.commit }} - draft: true - branch: ${{ env.branch }} - base: 'main' - title: ${{ env.title }} - body: ${{ env.body }} diff --git a/.node-version b/.node-version deleted file mode 100644 index 10fef252a..000000000 --- a/.node-version +++ /dev/null @@ -1 +0,0 @@ -20.18 diff --git a/.npmrc b/.npmrc index 907db23aa..f09c230b6 100644 --- a/.npmrc +++ b/.npmrc @@ -1,4 +1,3 @@ -node-version = 20.11.1 registry = https://registry.npmjs.org ignore-scripts = true @@ -14,7 +13,18 @@ strict-peer-dependents=true # Less strict, but required for tooling to not barf on duplicate peer trees. # (many libraries declare the same peers, which resolve to the same # versions) +peers-suffix-max-length=40 +dedupe-injected-deps=true dedupe-peer-dependents=true +; We disable this one because it removes the whole node_modules directory entirely +; (problematic for for invoking tools (tsc, glint, etc) +; dedupe-direct-deps=true + + +################ +# Hacks +################ +public-hoist-pattern[]=ember-source ################ # Compatibility diff --git a/.prettierrc.cjs b/.prettierrc.cjs index 1ee45a09f..e893bf2b5 100644 --- a/.prettierrc.cjs +++ b/.prettierrc.cjs @@ -2,7 +2,8 @@ module.exports = { printWidth: 100, - plugins: ['prettier-plugin-ember-template-tag'], + tailwindStylesheet: './app/styles/app.css', + plugins: ['prettier-plugin-ember-template-tag', 'prettier-plugin-tailwindcss'], overrides: [ { // Lol, JavaScript diff --git a/apps/repl/.eslintignore b/apps/repl/.eslintignore deleted file mode 120000 index 86039baf5..000000000 --- a/apps/repl/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -../../.eslintignore \ No newline at end of file diff --git a/apps/repl/.eslintrc.cjs b/apps/repl/.eslintrc.cjs deleted file mode 100644 index 8ca845406..000000000 --- a/apps/repl/.eslintrc.cjs +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -const { configs } = require('@nullvoxpopuli/eslint-configs'); -const { baseConfig: baseNode } = require('@nullvoxpopuli/eslint-configs/configs/node'); - -const config = configs.ember(); - -module.exports = { - ...config, - overrides: [ - ...config.overrides, - { - ...baseNode, - files: ['browserstack.testem.js'], - }, - ], -}; diff --git a/apps/repl/.template-lintrc.js b/apps/repl/.template-lintrc.cjs similarity index 100% rename from apps/repl/.template-lintrc.js rename to apps/repl/.template-lintrc.cjs diff --git a/apps/repl/CHANGELOG.md b/apps/repl/CHANGELOG.md deleted file mode 100644 index 1dec450e8..000000000 --- a/apps/repl/CHANGELOG.md +++ /dev/null @@ -1,13 +0,0 @@ -# limber - -## 0.0.1 - -### Patch Changes - -- Updated dependencies [[`ae14517`](https://github.com/NullVoxPopuli/limber/commit/ae1451732dda5ae03c4e100b6851743a99d74ee9), [`0e72a5d`](https://github.com/NullVoxPopuli/limber/commit/0e72a5dbddfd9c147d90a12b3e56d8e035ad7945), [`9631cfd`](https://github.com/NullVoxPopuli/limber/commit/9631cfdb5b0a56c6b7c8aa72cd1c75ef65c8d597), [`7dcfc53`](https://github.com/NullVoxPopuli/limber/commit/7dcfc5338b9a91e35a419b24330c3679c18632da), [`ff2de75`](https://github.com/NullVoxPopuli/limber/commit/ff2de75a7b0269e31dc224fff0d173a252cc26c4), [`f0b1c68`](https://github.com/NullVoxPopuli/limber/commit/f0b1c68da309f9fb39864def158539396086c5a5), [`1a825f9`](https://github.com/NullVoxPopuli/limber/commit/1a825f9c4062d557cf9b7b6adcf7d15800ccc710), [`fe81fc7`](https://github.com/NullVoxPopuli/limber/commit/fe81fc79130065ca28dd105b48107d2bd4675d84), [`29fd785`](https://github.com/NullVoxPopuli/limber/commit/29fd785d8e44280760f4b9f39248fbaa1b9188ee), [`fa9b78c`](https://github.com/NullVoxPopuli/limber/commit/fa9b78c0786ad523c7ec6096f9b2df5c5da473fc), [`74490d7`](https://github.com/NullVoxPopuli/limber/commit/74490d767b448381af3b41c60a0a58dbffb3e3ea), [`c52a615`](https://github.com/NullVoxPopuli/limber/commit/c52a615a5b427032fecc037cc71d983d4cfa9ffe)]: - - ember-repl@3.0.0 - - limber-ui@1.0.0 - - @nullvoxpopuli/limber-codemirror@0.0.1 - - @nullvoxpopuli/limber-styles@0.0.1 - - @nullvoxpopuli/limber-transpilation@0.0.1 - - @nullvoxpopuli/horizon-theme@0.0.1 diff --git a/apps/repl/app/app.ts b/apps/repl/app/app.ts index 452f1d860..6f13e5321 100644 --- a/apps/repl/app/app.ts +++ b/apps/repl/app/app.ts @@ -1,28 +1,14 @@ import 'limber-ui/theme.css'; import 'ember-statechart-component'; +import './icons.ts'; -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -import { DEBUG } from '@glimmer/env'; import Application from '@ember/application'; -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -import { _backburner } from '@ember/runloop'; -import loadInitializers from 'ember-load-initializers'; import Resolver from 'ember-resolver'; import config from 'limber/config/environment'; -if (DEBUG) { - // This has performance implications, but the debuggability is worth it. - // Debugging eventloop stuff is notoriously difficult, so let's make it - // not difficult by default. - // - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - _backburner.DEBUG = true; -} +import { registry } from './registry.ts'; // @babel/traverse (from babel-plugin-ember-template-imports) // accesses process..... @@ -35,8 +21,5 @@ Object.assign(window, { export default class App extends Application { modulePrefix = config.modulePrefix; - podModulePrefix = config.podModulePrefix; - Resolver = Resolver; + Resolver = Resolver.withModules(registry); } - -loadInitializers(App, config.modulePrefix); diff --git a/apps/repl/app/components/limber/copy-menu.gts b/apps/repl/app/components/limber/copy-menu.gts index 7b6091b42..3a32c2070 100644 --- a/apps/repl/app/components/limber/copy-menu.gts +++ b/apps/repl/app/components/limber/copy-menu.gts @@ -9,13 +9,13 @@ import Menu from './menu'; */ export default class CopyMenu extends Component { copyAsText = (event: Event) => { - let code = getSnippetElement(event); + const code = getSnippetElement(event); navigator.clipboard.writeText(code.innerText); }; copyAsImage = async (event: Event) => { - let code = getSnippetElement(event); + const code = getSnippetElement(event); await copyToClipboard(code); }; @@ -23,7 +23,7 @@ export default class CopyMenu extends Component {