Skip to content
Open
Show file tree
Hide file tree
Changes from 71 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
b4e1769
WIP initial implementation
infomiho Jul 22, 2025
8b708bb
Apply the SDK location hack to the libs
infomiho Jul 22, 2025
49d979c
Include libs in the built CLI
infomiho Jul 22, 2025
a352e57
Merge branch 'main' into templates-to-libs
infomiho Jul 28, 2025
97a6838
Add build config. Copy libs in the Dockerfile.
infomiho Jul 28, 2025
121901f
Update todoApp package-lock.json
infomiho Jul 28, 2025
4e248ae
Merge branch 'main' into templates-to-libs
infomiho Jul 29, 2025
ac9d038
Fixes libs deps install in Dockerfile
infomiho Jul 29, 2025
3840e58
Move to using npm pack
infomiho Jul 30, 2025
db8aaeb
Formatting
infomiho Jul 30, 2025
ac55723
Client entry point experiment
infomiho Jul 30, 2025
6dfc790
Fix copy command
infomiho Jul 30, 2025
7a84ae8
Formatting
infomiho Jul 30, 2025
e8c955a
Refactor code
infomiho Jul 31, 2025
f0cfe95
Cleanup
infomiho Jul 31, 2025
2f77c1c
Merge branch 'main' into templates-to-libs
infomiho Aug 11, 2025
36b720c
Install script update
infomiho Aug 11, 2025
083fecb
Append hash to tarball path
infomiho Aug 11, 2025
9a70244
Exclude auth lib from Vite optimizations
infomiho Aug 11, 2025
b450ef2
Test auth client code, test using peerDependencies.
infomiho Aug 11, 2025
00e6fbf
Migrate to tsdown
infomiho Aug 11, 2025
90eab52
Refactor unit tests
infomiho Aug 11, 2025
6b6b2f7
Move typeVersions comment
infomiho Aug 11, 2025
3c818cd
d.ts sourcemap. cleanup.
infomiho Aug 11, 2025
7e76f65
PR comments
infomiho Aug 11, 2025
43aaac5
Refactor
infomiho Aug 11, 2025
1073098
Update shell scripts
infomiho Aug 12, 2025
828b096
Use newtype
infomiho Aug 12, 2025
aa05550
Fix unit tests
infomiho Aug 12, 2025
c4099d5
Update exports to be explict about sdk and server exports
infomiho Aug 12, 2025
82f258c
Refactor WaspLib to have the checksum from creation
infomiho Aug 12, 2025
c3454d7
Copy libs to both out and build dir
infomiho Aug 12, 2025
22958f5
Update the README
infomiho Aug 13, 2025
9f3a53a
Update README and WaspLib to clarify library versioning and improve S…
infomiho Aug 13, 2025
a06e101
Remove redundant copying of libs to the build directory
infomiho Aug 13, 2025
1e1d36c
Merge branch 'main' into templates-to-libs
infomiho Aug 14, 2025
190e789
PR comments
infomiho Aug 14, 2025
fb548b0
Fix Dockerfile consistency
infomiho Aug 14, 2025
48dfe49
Comment dots, scripts cleanup.
infomiho Aug 14, 2025
58fe09a
Formatting
infomiho Aug 14, 2025
bd54fb4
Merge branch 'main' into templates-to-libs
infomiho Aug 14, 2025
ef0182b
Improve Tarball module
infomiho Aug 14, 2025
8851649
WaspLibs comment
infomiho Aug 14, 2025
9fc9e17
Add WaspLib comment
infomiho Aug 14, 2025
8a4ce86
Define SDK package name
infomiho Aug 14, 2025
a88c972
Unit tests helper
infomiho Aug 14, 2025
5bd2680
PR comments
infomiho Aug 14, 2025
4f0a8e7
Naming
infomiho Aug 14, 2025
211a04b
Update unit tests
infomiho Aug 14, 2025
03066ee
Move getting WaspLibs out of AppSpec
infomiho Aug 14, 2025
ae1255b
Ignore `tgz` files in e2e tests (#3078)
infomiho Sep 9, 2025
b9ace98
Merge branch 'main' into templates-to-libs
infomiho Sep 9, 2025
f50e54b
Fix unit tests
infomiho Sep 9, 2025
2478372
Merge branch 'main' into templates-to-libs
infomiho Sep 10, 2025
cd5347c
Remove typesVersions since it's redundant now
infomiho Sep 10, 2025
438314a
Rename from @wasp.sh/{libs-auth => lib-auth}
infomiho Sep 10, 2025
10803d4
Improve password tests
infomiho Sep 10, 2025
52fe7f2
Add Reader monad to Generator to use WaspLibs more easily
infomiho Sep 11, 2025
f2df493
Replace explicit copying of libs with generating copy file drafts
infomiho Sep 11, 2025
b234395
PR comments
infomiho Sep 11, 2025
669faca
Merge branch 'main' into templates-to-libs
infomiho Sep 24, 2025
4e6ddbb
Merge branch 'main' into templates-to-libs
infomiho Sep 26, 2025
5f3078e
PR comments
infomiho Sep 26, 2025
b0417a3
Named empty waspLibs list
infomiho Sep 27, 2025
a695db1
Update package copying scripts safety
infomiho Sep 27, 2025
cd6940b
Rename npm dep making fn
infomiho Sep 27, 2025
5771e1f
Update libs README
infomiho Sep 27, 2025
4b5a1c7
Simplify makeWaspLib
infomiho Sep 27, 2025
133e837
Return CI note for the packages README
infomiho Sep 27, 2025
bcab437
Update tsconfig to be more general
infomiho Sep 30, 2025
f1a21e0
Use ESM only profile for arethetypeswrong
infomiho Sep 30, 2025
563c00c
Fix formatting
infomiho Oct 2, 2025
7c08e2d
Merge branch 'main' into templates-to-libs
infomiho Oct 3, 2025
e2d5eda
Update unit tests
infomiho Oct 3, 2025
12b925a
Include `files` note in the README
infomiho Oct 3, 2025
0fae11c
Drop `types` to allow `@types/` packages to be used
infomiho Oct 3, 2025
ac02cca
Update package.json to replace 'import' with 'default' in exports
infomiho Oct 3, 2025
6ecacc3
Use `attw` as dev dep instead of through npx
infomiho Oct 3, 2025
075cc77
Add build:libs command to `run` script
infomiho Oct 3, 2025
1587964
Add note about adding new libs to AvailableLibs module
infomiho Oct 3, 2025
279d1b4
Cleanup Auth.tsx
infomiho Oct 3, 2025
38fdbe0
Update cookies import and formatting
infomiho Oct 3, 2025
0bec41e
Update comment in makeWaspLib to clarify why we append the checksum
infomiho Oct 3, 2025
68a4035
Update README paths
infomiho Oct 3, 2025
500f574
Remove libs/ dir from Git
infomiho Oct 3, 2025
2dc8399
Rename sanitizePackageNameAsNpmPackTarball to packageNameToTarballPrefix
infomiho Oct 3, 2025
97f1a49
Fix typos and improve clarity in WaspLib documentation
infomiho Oct 3, 2025
d07b368
Improve packages install script
infomiho Oct 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/waspc-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,14 @@ jobs:
npm ci
npm test

- name: Compile TS packages and move it into the Cabal data dir
- name: Compile TS packages and move them into the Cabal data dir
if: matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-13'
run: ./tools/install_packages_to_data_dir.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be using ./run instead of the script in all cases?


- name: Compile Wasp libs and move them into the Cabal data dir
if: matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-13'
run: ./tools/install_libs_to_data_dir.sh

- name: Build external dependencies
run: cabal build --enable-tests --enable-benchmarks --only-dependencies

Expand Down
13 changes: 8 additions & 5 deletions waspc/cli/src/Wasp/Cli/Command/Deps.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import Wasp.Cli.Terminal (title)
import qualified Wasp.ExternalConfig.Npm.Dependency as Npm.Dependency
import qualified Wasp.Generator.NpmDependencies as N
import qualified Wasp.Generator.ServerGenerator as ServerGenerator
import qualified Wasp.Generator.WaspLibs.AvailableLibs as WaspLibs.AvailableLibs
import qualified Wasp.Generator.WaspLibs.WaspLib as WaspLib
import qualified Wasp.Generator.WebAppGenerator as WebAppGenerator
import Wasp.Project (analyzeWaspProject)
import qualified Wasp.Util.Terminal as Term
Expand All @@ -27,24 +29,25 @@ deps = do
(throwError . CommandError "Determining dependencies failed due to a compilation error in your Wasp project" . unwords)
return
appSpecOrAnalyzerErrors
waspLibs <- liftIO WaspLibs.AvailableLibs.makeWaspLibs

liftIO $ putStrLn $ depsMessage appSpec
liftIO $ putStrLn $ depsMessage appSpec waspLibs

depsMessage :: AppSpec -> String
depsMessage appSpec =
depsMessage :: AppSpec -> [WaspLib.WaspLib] -> String
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should be showing the libraries, they should be transparent and have no significative version number by themselves. And if I got it right, users should not be importing the libraries.

depsMessage appSpec waspLibs =
unlines $
[ "",
title "Below are listed the dependencies that Wasp uses in your project. You can import and use these directly in the code as if you specified them yourself, but you can't change their versions.",
""
]
++ printDeps
"Server dependencies:"
( N.waspDependencies $ ServerGenerator.npmDepsForWasp appSpec
( N.waspDependencies $ ServerGenerator.npmDepsForWasp appSpec waspLibs
)
++ [""]
++ printDeps
"Server devDependencies:"
( N.waspDevDependencies $ ServerGenerator.npmDepsForWasp appSpec
( N.waspDevDependencies $ ServerGenerator.npmDepsForWasp appSpec waspLibs
)
++ [""]
++ printDeps
Expand Down
1 change: 1 addition & 0 deletions waspc/data/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
packages
Generator/libs/*.tgz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mentioned this in a different thread, but why don't we ignore the entire libs directory and have the exact same setup as we do with packages?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come we're using a different system than the one we use for packages?

Specifically, why are we adding this folder to version control instead of creating during install_libs_to_data_dir as we do for install_packages_to_data_dir?

Empty file.
5 changes: 5 additions & 0 deletions waspc/data/Generator/templates/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ COPY package-lock.json .
COPY tsconfig*.json .
COPY server .wasp/build/server
COPY sdk .wasp/out/sdk
# We copy Wasp libs twice, because server needs them in .wasp/build/libs
# and SDK needs them in .wasp/out/libs becuase the SDK needs to live in the
# out directory to be accessible to the client code: https://github.com/wasp-lang/wasp/issues/1769
COPY libs .wasp/build/libs
COPY libs .wasp/out/libs
Comment on lines +41 to +45
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, something seems off with this setup.

We're installing libs from tarballs but still have to copy the root directory twice. It seems we should just copy the tarballs and delegate the installation to NPM.

Was this undoable because of the linked issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we are copying only the tarballs in this case the libs dir contains:

tree libs
libs
└── wasp.sh-lib-auth-cde4448e.tgz

The SDK installs it like this:

{
  "dependencies": "file:../../libs/wasp.sh-lib-auth-cde4448e.tgz"
}

and the server installs it like this:

{
  "dependencies": "file:../libs/wasp.sh-lib-auth-cde4448e.tgz"
}

Because of the linked issue we have to have both out and build dirs in the Docker container, we have to make sure that both SDK and the server can resolve the libs successfully.

I didn't want to perpetuate the hack by modifying the install location for the server like this:

{
  "dependencies": "file:../../out/libs/wasp.sh-lib-auth-cde4448e.tgz"
}

Once we come up with a solution for the libs needing to live in the out dir even for the production build, I believe we'll be able to drop one of the COPY commands from the Dockerfile.

# Install npm packages, resulting in node_modules/.
RUN npm install && cd .wasp/build/server && npm install
{=# usingPrisma =}
Expand Down
2 changes: 1 addition & 1 deletion waspc/data/Generator/templates/react-app/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const defaultViteConfig = {
detectServerImports(),
],
optimizeDeps: {
exclude: ['wasp']
exclude: {=& depsExcludedFromOptimization =}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
exclude: {=& depsExcludedFromOptimization =}
exclude: {=& depsExcludedFromOptimization =}

},
server: {
port: {= defaultClientPort =},
Expand Down
13 changes: 2 additions & 11 deletions waspc/data/Generator/templates/sdk/wasp/auth/forms/Auth.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{{={= =}=}}
import { useState, createContext, useMemo } from 'react'
import { useState, useMemo, type CSSProperties } from 'react'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { useState, useMemo, type CSSProperties } from 'react'
import { useState, useMemo } from 'react'

import { AuthContext, type ErrorMessage } from '@wasp.sh/lib-auth/sdk/browser'
import styles from './Auth.module.css'
import './internal/auth-styles.css'
import { tokenObjToCSSVars } from "./internal/util"
import { CSSProperties } from "react"

import {
type State,
type CustomizationOptions,
type ErrorMessage,
type AdditionalSignupFields,
} from './types'
import { LoginSignupForm } from './internal/common/LoginSignupForm'
Expand All @@ -24,14 +23,6 @@ const logoStyle = {
}


// PRIVATE API
export const AuthContext = createContext({
isLoading: false,
setIsLoading: (isLoading: boolean) => {},
setErrorMessage: (errorMessage: ErrorMessage | null) => {},
setSuccessMessage: (successMessage: string | null) => {},
})

function Auth ({ state, appearance, logo, socialLayout = 'horizontal', additionalSignupFields }: {
state: State;
} & CustomizationOptions & {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{{={= =}=}}
import { useContext } from 'react'
import { useForm, UseFormReturn } from 'react-hook-form'
import styles from './LoginSignupForm.module.css'
import '../auth-styles.css'
import { config } from 'wasp/client'
import { clsx } from '../util'

import { AuthContext } from '../../Auth'
import { useAuthContext } from '@wasp.sh/lib-auth/sdk/browser'
import {
Form,
FormInput,
Expand Down Expand Up @@ -81,7 +80,7 @@ export const LoginSignupForm = ({
setErrorMessage,
setSuccessMessage,
setIsLoading,
} = useContext(AuthContext)
} = useAuthContext();
const isLogin = state === 'login'
const cta = isLogin ? 'Log in' : 'Sign up';
{=# isAnyPasswordBasedAuthEnabled =}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { useContext } from 'react'
import { useForm } from 'react-hook-form'
import { useAuthContext } from '@wasp.sh/lib-auth/sdk/browser'

import { requestPasswordReset } from '../../../email/actions/passwordReset.js'
import { Form, FormItemGroup, FormLabel, FormInput, SubmitButton, FormError } from '../Form'
import { AuthContext } from '../../Auth'


// PRIVATE API
export const ForgotPasswordForm = () => {
const { register, handleSubmit, reset, formState: { errors } } = useForm<{ email: string }>()
const { isLoading, setErrorMessage, setSuccessMessage, setIsLoading } = useContext(AuthContext)
const { isLoading, setErrorMessage, setSuccessMessage, setIsLoading } = useAuthContext()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When doing big PRs like this, I advise staying away from all other changes, no matter how minor.

This can stay but we should apply the principle to future PRs.

Btw, update the public API table if necessary.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think it's good that he made this change, it's scoped enough to be a demonstration and a proof that it works, without big changes otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a POC where I had to get a feel for how the lib will ship browser code - I didn't want to ship the system which would be completely wrong for browser stuff. I can remove this bit if you want and add it in a separate PR.


const onSubmit = async (data) => {
setIsLoading(true)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { useContext } from 'react'
import { useForm } from 'react-hook-form'
import { resetPassword } from '../../../email/actions/passwordReset.js'
import { useLocation } from 'react-router-dom'
import { useAuthContext } from '@wasp.sh/lib-auth/sdk/browser'

import { resetPassword } from '../../../email/actions/passwordReset.js'
import { Form, FormItemGroup, FormLabel, FormInput, SubmitButton, FormError } from '../Form'
import { AuthContext } from '../../Auth'

// PRIVATE API
export const ResetPasswordForm = () => {
const { register, handleSubmit, reset, formState: { errors } } = useForm<{ password: string; passwordConfirmation: string }>()
const { isLoading, setErrorMessage, setSuccessMessage, setIsLoading } = useContext(AuthContext)
const { isLoading, setErrorMessage, setSuccessMessage, setIsLoading } = useAuthContext()
const location = useLocation()
const token = new URLSearchParams(location.search).get('token')
const onSubmit = async (data) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useContext, useEffect } from 'react'
import { useEffect } from 'react'
import { useLocation } from 'react-router-dom'
import { useAuthContext } from '@wasp.sh/lib-auth/sdk/browser'
import { verifyEmail } from '../../../email/actions/verifyEmail.js'
import { Message } from '../Message'
import { AuthContext } from '../../Auth'

// PRIVATE API
export const VerifyEmailForm = () => {
const { isLoading, setErrorMessage, setSuccessMessage, setIsLoading } = useContext(AuthContext)
const { isLoading, setErrorMessage, setSuccessMessage, setIsLoading } = useAuthContext()
const location = useLocation()
const token = new URLSearchParams(location.search).get('token')

Expand Down
6 changes: 0 additions & 6 deletions waspc/data/Generator/templates/sdk/wasp/auth/forms/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ export type CustomizationOptions = {
}
}

// PRIVATE API
export type ErrorMessage = {
title: string
description?: string
}

// PRIVATE API
export type FormState = {
isLoading: boolean
Expand Down
25 changes: 9 additions & 16 deletions waspc/data/Generator/templates/sdk/wasp/auth/jwt.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
import * as jwt from 'oslo/jwt'
import { config } from 'wasp/server'
import { createJWTHelpers } from "@wasp.sh/lib-auth/sdk";

const JWT_SECRET = new TextEncoder().encode(config.auth.jwtSecret)
const JWT_ALGORITHM = 'HS256'
import { config } from "wasp/server";

// PRIVATE API
export function createJWT(
data: Parameters<typeof jwt.createJWT>[2],
options: Parameters<typeof jwt.createJWT>[3],
): Promise<string> {
return jwt.createJWT(JWT_ALGORITHM, JWT_SECRET, data, options)
}
const JWT_SECRET = new TextEncoder().encode(config.auth.jwtSecret);
const JWT_ALGORITHM = "HS256";

// PRIVATE API
export async function validateJWT<Payload>(token: string): Promise<Payload> {
const { payload } = await jwt.validateJWT(JWT_ALGORITHM, JWT_SECRET, token)
return payload as Payload
}
export const { createJWT, validateJWT } = createJWTHelpers(
JWT_SECRET,
JWT_ALGORITHM,
);

// PRIVATE API
export { TimeSpan } from 'oslo'
export { TimeSpan } from "@wasp.sh/lib-auth/sdk";
37 changes: 1 addition & 36 deletions waspc/data/Generator/templates/sdk/wasp/auth/password.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1 @@
import { hash, verify, Version, type Options } from "@node-rs/argon2";

// The options are the same as the ones used in the oslo/password library
const hashingOptions: Options = {
memoryCost: 19456,
timeCost: 2,
outputLen: 32,
parallelism: 1,
version: Version.V0x13,
};

// PRIVATE API
export async function hashPassword(password: string): Promise<string> {
return hash(normalizePassword(password), hashingOptions);
}

// PRIVATE API
export async function verifyPassword(
hashedPassword: string,
password: string
): Promise<void> {
const validPassword = await verify(
hashedPassword,
normalizePassword(password),
hashingOptions
);
if (!validPassword) {
throw new Error("Invalid password");
}
}

// We are normalising the password to ensure that the password is always hashed in the same way
// We have the same normalising process as oslo/password did in the past
function normalizePassword(password: string): string {
return password.normalize("NFKC");
}
export { hashPassword, verifyPassword } from "@wasp.sh/lib-auth/sdk";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree!

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { parseCookies } from "@wasp.sh/lib-auth/server";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this matters (probably not), but I'd expect our lib imports to come below "normal" imports like express.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, I agree with this order, I even group imports:

  • built-in
  • 3rd party
  • (I guess libs would go here)
  • relative imports

import {
Request as ExpressRequest,
Response as ExpressResponse,
} from 'express';
import { parseCookies } from 'oslo/cookie';
} from "express";

import type { ProviderConfig } from 'wasp/auth/providers/types';
import { config } from 'wasp/server';
import type { ProviderConfig } from "wasp/auth/providers/types";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double quotes? Is this a formatting mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we are consistent with formatting in the templates, I'll revert the change to keep the diff cleaner 👍

import { config } from "wasp/server";

import type { OAuthStateFieldName } from './state';
import type { OAuthStateFieldName } from "./state";

export function setOAuthCookieValue(
provider: ProviderConfig,
Expand Down
6 changes: 5 additions & 1 deletion waspc/e2e-tests/GoldenTest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import ShellCommands
import qualified StrongPath as SP
import System.Directory (doesFileExist)
import System.Directory.Recursive (getDirFiltered)
import System.FilePath (makeRelative, takeFileName)
import System.FilePath (isExtensionOf, makeRelative, takeFileName)
import qualified System.FilePath as FP
import System.Process (callCommand)
import Test.Tasty (TestTree, testGroup)
Expand Down Expand Up @@ -115,6 +115,7 @@ runGoldenTest goldenTest = do
"tsconfig.tsbuildinfo",
"dist"
]
&& not (isTgzFile filePath)

writeExpectedFilesList :: String -> [FilePath] -> FilePath -> IO ()
writeExpectedFilesList baseAbsFp filesForCheckingExistenceAbsFps expectedFilesListAbsFp = do
Expand Down Expand Up @@ -150,3 +151,6 @@ runGoldenTest goldenTest = do
where
unsafeDecodeAnyJson :: B.ByteString -> Aeson.Value
unsafeDecodeAnyJson = fromJust . Aeson.decodeStrict

isTgzFile :: FilePath -> Bool
isTgzFile = (".tgz" `isExtensionOf`)
Loading
Loading