npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@sdaio/wdio-hot-reload-service

v1.0.2

Published

WebdriverIO service for transparent hot module reloading during test execution

Readme

@sdaio/wdio-hot-reload-service

A WebdriverIO service that provides transparent hot module reloading for test automation. Make changes to your page objects and see them reflected immediately without restarting your tests!

Features

  • 🔄 Transparent hot reloading - Regular imports work automatically with hot reloading
  • 🛠️ Zero configuration - Works out of the box with sensible defaults
  • 📁 Configurable directories - Specify which directories get hot reloading
  • 🚀 No code changes required - Engineers use standard import syntax
  • Instant updates - See changes immediately without test restarts

Installation

npm install --save-dev @sdaio/wdio-hot-reload-service

Usage

Add the service to your wdio.conf.ts:

import HotReloadService from '@sdaio/wdio-hot-reload-service';

export const config = {
  // ... other config
  services: [
    [HotReloadService, {
      // Optional configuration
      debug: true,
      hotReloadDirs: ['./test/pageobjects', './src/pageobjects'],
      watchPaths: ['./test/**/*.ts', './src/**/*.ts'],
      exclude: ['node_modules', '@wdio', 'webdriverio']
    }]
  ]
};

How It Works

The service transparently intercepts module loading using Node's module system. When you import a page object:

import { LoginPage } from '../pageobjects/login.page';

describe('Login Test', () => {
  it('should login', () => {
    LoginPage.open();
    LoginPage.login('user', 'pass');
    // Edit login.page.ts and changes are reflected immediately!
  });
});

Behind the scenes, the service:

  1. Creates proxies for page object classes
  2. Watches for file changes
  3. Clears the module cache when files change
  4. Reloads the module on next access

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | debug | boolean | false | Enable debug logging | | hotReloadDirs | string[] | ['./test/pageobjects', './src/pageobjects'] | Directories to enable hot reloading for | | watchPaths | string[] | ['./test/**/*.ts', './src/**/*.ts'] | File patterns to watch for changes | | exclude | string[] | ['node_modules', '@wdio', 'webdriverio'] | Patterns to exclude from watching |

Requirements

  • WebdriverIO v8.0.0 or higher
  • Node.js 14 or higher

Example

// login.page.ts
export class LoginPage {
  static open() {
    browser.url('/login');
  }
  
  static login(username: string, password: string) {
    console.log('Logging in...'); // Change this while test is running!
    $('#username').setValue(username);
    $('#password').setValue(password);
    $('#submit').click();
  }
}

// login.test.ts
import { LoginPage } from '../pageobjects/login.page';

describe('Login', () => {
  it('should login', async () => {
    LoginPage.open();
    
    // Pause to allow editing login.page.ts
    await browser.pause(5000);
    
    LoginPage.login('user', 'pass'); // Will use updated code!
  });
});

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.