-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Try to make a test to prevent #1688 (and other prettier breakages) * Seems fine so far... * Add node testing to CI * delete unused file * Remove mention of run-node-tests * Why isn't linting working? * As I feared, we have the build wrong * idk man * run pnpm repo:update:metadata * Lints -- these are actually all correct * Fix #1688 * Move test project into a real project, rather than tmp for easier poking around * Set vitest conditions * Curious * Fix node smoke * Remove extraneous test * Why doesn't my local CLI env match CI * lockfile * different logging * Now its working? * Codify the requirements for running the types check * More turbo progress * omg it worked * Maybe I just remove the local lint script * Don't need that anymore * Fix * Updates * fix * last fix?
- Loading branch information
1 parent
54e65f9
commit bfd391f
Showing
68 changed files
with
700 additions
and
168 deletions.
There are no files selected for viewing
This file contains 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 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,4 @@ | ||
.DS_Store | ||
/dist | ||
**/dist | ||
/control-dist/ | ||
|
This file contains 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 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 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 was deleted.
Oops, something went wrong.
This file contains 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 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 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 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 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
2 changes: 2 additions & 0 deletions
2
packages/@glimmer-workspace/integration-node-tests/.gitignore
This file contains 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,2 @@ | ||
packages/ | ||
pnpm-lock.yaml |
21 changes: 21 additions & 0 deletions
21
packages/@glimmer-workspace/integration-node-tests/package.json
This file contains 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,21 @@ | ||
{ | ||
"name": "@glimmer-workspace/integration-node-tests", | ||
"version": "0.92.0", | ||
"type": "module", | ||
"private": true, | ||
"repo-meta": { | ||
"strictness": "loose" | ||
}, | ||
"scripts": { | ||
"test:node": "vitest --run" | ||
}, | ||
"dependencies": { | ||
"@glimmer/syntax": "workspace:*", | ||
"execa": "^9.5.2", | ||
"prettier": "^3.4.2" | ||
}, | ||
"devDependencies": { | ||
"@glimmer-workspace/repo-metadata": "workspace:*", | ||
"vitest": "^3.0.4" | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
packages/@glimmer-workspace/integration-node-tests/test/prettier.test.ts
This file contains 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,41 @@ | ||
import { createRequire } from 'node:module'; | ||
|
||
import * as prettier from 'prettier'; | ||
import { describe, expect, it } from 'vitest'; | ||
|
||
const require = createRequire(import.meta.url); | ||
|
||
/** | ||
* See: https://github.com/glimmerjs/glimmer-vm/issues/1688 | ||
* | ||
* Requires the root package.json#pnpm#overrides point at our internal | ||
* copy of @glimmer/syntax, or else prettier brings its own already published | ||
* copy of @glimmer/syntax | ||
* | ||
* NOTE: that this test alone is insufficient to test our built outputs. | ||
* the smoke-tests/* folders are for that purpose. | ||
*/ | ||
describe('Prettier', () => { | ||
it(`SMOKE: we've symlinked to the in-repo copy of @glimmer/syntax`, () => { | ||
let workspacePath = require.resolve('@glimmer/syntax'); | ||
let prettierPath = require.resolve('prettier'); | ||
let prettierGlimmer = require.resolve('@glimmer/syntax', { paths: [prettierPath] }); | ||
|
||
expect(prettierGlimmer).toBe(workspacePath); | ||
}); | ||
|
||
it('Underlynig preprocess API works', async () => { | ||
let result = (await import('@glimmer/syntax')).preprocess('<h1></h1>'); | ||
|
||
expect(result, `It can be await import()'d, and doesn't error`).toBeTruthy(); | ||
}); | ||
|
||
it('Prettier can call preprocess', async () => { | ||
let result = await prettier.format(` <div>\n</div>`, { parser: 'glimmer' }); | ||
|
||
expect(result).toMatchInlineSnapshot(` | ||
"<div> | ||
</div>" | ||
`); | ||
}); | ||
}); |
This file contains 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 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 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 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 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 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 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 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 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 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.