You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,10 @@ export default {
46
46
- Install dependencies using `pnpm install`
47
47
- Run interactive tests using `pnpm dev`
48
48
49
+
## Acknowledgements
50
+
51
+
Some features in impound were inspired by [TanStack Start's import protection](https://tanstack.com/start/latest/docs/framework/react/guide/import-protection).
constresult=awaitprocess(code('bar'),{patterns: [['bar','"bar" is a dangerous library and should never be used.']]})asRollupError
119
119
expect(result.message).toMatchInlineSnapshot(`"[plugin impound] "bar" is a dangerous library and should never be used. [importing \`bar\` from \`entry.js\`]"`)
120
120
})
121
+
122
+
it('appends suggestions to error message',async()=>{
123
+
constresult=awaitprocess(code('bar'),{
124
+
patterns: [['bar','Server-only import',['Use a server function instead','Move this import to a .server.ts file']]],
125
+
})asRollupError
126
+
expect(result.message).toMatchInlineSnapshot(`
127
+
"[plugin impound] Server-only import [importing \`bar\` from \`entry.js\`]
0 commit comments