Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages (next) #46

Merged
merged 1 commit into from
Aug 5, 2024
Merged

Version Packages (next) #46

merged 1 commit into from
Aug 5, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 3, 2024

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

main is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on main.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@heymp/scratchpad@1.0.0-next.8

Major Changes

  • 4aa2817: Add generate config command #38

    npx @heymp/scratchpad generate --help
    
    Usage: scratchpad generate [options] [command]
    
    Generate files from templates.
    
    Options:
      -h, --help      display help for command
    
    Commands:
      config          Generates an example config file.
      help [command]  display help for command
  • 4aa2817: Add run command

    npx @heymp/scratchpad run --help
    
    Usage: cli run [options] <file>
    
    Execute a file in a browser.
    
    Arguments:
      file                  file to execute in the browser.
    
    Options:
      --headless [boolean]  specify running the browser in headless
                            mode.
      --devtools [boolean]  open browser devtools automatically.
      --ts-write [boolean]  write the js output of the target ts file.
      --url [string]        specify a specific url to execute the code
                            in.
      -h, --help            display help for command

Minor Changes

  • ea5b50d: Add writeFile, appendFile exposed functions. (feat: expose ability to save results of scripts to file. #44)[https://github.com/feat: expose ability to save results of scripts to file. #44]

    await writeFile('./log.txt', 'hello');
    await appendFile('./log.txt', '\n');
    await appendFile('./log.txt', 'world');

    Include custom exposed functions example.

    import { join } from 'node:path'
    import fs from 'node:fs/promises';
    
    function loadFile(path) {
      return fs.readFile(join(process.cwd(), path), 'utf8');
    }
    
    export default /** @type {import('@heymp/scratchpad/src/config').Config} */ ({
      playwright: async (args) => {
        const { context, page } = args;
        await context.exposeFunction('loadFile', loadFile)
      }
    });
  • a242c0f: ⚠️ Change config types directory.

    export default /** @type {import('@heymp/scratchpad/src/config').Config} */ ({});

@heyMP heyMP merged commit 8bcfaf4 into main Aug 5, 2024
@heyMP heyMP deleted the changeset-release/main branch August 5, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant