BREAKING CHANGE(core): switch to esm
This commit is contained in:
parent
d3732dcecc
commit
72e6ef04cb
21403
package-lock.json
generated
21403
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
19
package.json
19
package.json
@ -5,26 +5,25 @@
|
|||||||
"description": "simplified access to puppeteer",
|
"description": "simplified access to puppeteer",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
|
"type": "module",
|
||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/)",
|
"test": "tstest test/",
|
||||||
"build": "(tsbuild --web)",
|
"build": "tsbuild --web --allowimplicitany"
|
||||||
"format": "(gitzone format)"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.28",
|
"@gitzone/tsbuild": "^2.1.60",
|
||||||
"@gitzone/tstest": "^1.0.59",
|
"@gitzone/tstest": "^1.0.69",
|
||||||
"@pushrocks/tapbundle": "^3.2.14",
|
"@pushrocks/tapbundle": "^5.0.3",
|
||||||
"@types/node": "^16.11.6",
|
"@types/node": "^17.0.23",
|
||||||
"tslint": "^6.1.3",
|
"tslint": "^6.1.3",
|
||||||
"tslint-config-prettier": "^1.15.0"
|
"tslint-config-prettier": "^1.15.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartdelay": "^2.0.13",
|
"@pushrocks/smartdelay": "^2.0.13",
|
||||||
"@pushrocks/smartenv": "^4.0.16",
|
"@pushrocks/smartshell": "^2.0.30",
|
||||||
"@pushrocks/smartshell": "^2.0.29",
|
"puppeteer": "^13.5.1",
|
||||||
"puppeteer": "^11.0.0",
|
|
||||||
"tree-kill": "^1.2.2"
|
"tree-kill": "^1.2.2"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { expect, tap } from '@pushrocks/tapbundle';
|
import { expect, tap } from '@pushrocks/tapbundle';
|
||||||
import * as smartpuppeteer from '../ts/index';
|
import * as smartpuppeteer from '../ts/index.js';
|
||||||
|
|
||||||
tap.test('first test', async (tools) => {
|
tap.test('first test', async (tools) => {
|
||||||
const headlessBrowser = await smartpuppeteer.getEnvAwareBrowserInstance({
|
const headlessBrowser = await smartpuppeteer.getEnvAwareBrowserInstance({
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// module exports
|
// module exports
|
||||||
|
|
||||||
export * from './smartpuppeteer.classes.smartpuppeteer';
|
export * from './smartpuppeteer.classes.smartpuppeteer.js';
|
||||||
export * from './smartpuppeteer.classes.incognitobrowser';
|
export * from './smartpuppeteer.classes.incognitobrowser.js';
|
||||||
|
|
||||||
// direct exports
|
// direct exports
|
||||||
import { puppeteer } from './smartpuppeteer.plugins';
|
import { puppeteer } from './smartpuppeteer.plugins.js';
|
||||||
export { puppeteer };
|
export { puppeteer };
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { getEnvAwareBrowserInstance } from './smartpuppeteer.classes.smartpuppeteer';
|
import { getEnvAwareBrowserInstance } from './smartpuppeteer.classes.smartpuppeteer.js';
|
||||||
import * as plugins from './smartpuppeteer.plugins';
|
import * as plugins from './smartpuppeteer.plugins.js';
|
||||||
|
|
||||||
export class IncognitoBrowser {
|
export class IncognitoBrowser {
|
||||||
public status: 'started' | 'stopped' = 'stopped';
|
public status: 'started' | 'stopped' = 'stopped';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as plugins from './smartpuppeteer.plugins';
|
import * as plugins from './smartpuppeteer.plugins.js';
|
||||||
|
|
||||||
export interface IEnvAwareOptions {
|
export interface IEnvAwareOptions {
|
||||||
forceNoSandbox?: boolean;
|
forceNoSandbox?: boolean;
|
||||||
@ -7,7 +7,6 @@ export interface IEnvAwareOptions {
|
|||||||
export const getEnvAwareBrowserInstance = async (
|
export const getEnvAwareBrowserInstance = async (
|
||||||
optionsArg: IEnvAwareOptions = {}
|
optionsArg: IEnvAwareOptions = {}
|
||||||
): Promise<plugins.puppeteer.Browser> => {
|
): Promise<plugins.puppeteer.Browser> => {
|
||||||
const smartenv = new plugins.smartenv.Smartenv();
|
|
||||||
const options: IEnvAwareOptions = {
|
const options: IEnvAwareOptions = {
|
||||||
...{
|
...{
|
||||||
forceNoSandbox: false,
|
forceNoSandbox: false,
|
||||||
|
@ -5,10 +5,9 @@ export { os };
|
|||||||
|
|
||||||
// @pushrocks scope
|
// @pushrocks scope
|
||||||
import * as smartdelay from '@pushrocks/smartdelay';
|
import * as smartdelay from '@pushrocks/smartdelay';
|
||||||
import * as smartenv from '@pushrocks/smartenv';
|
|
||||||
import * as smartshell from '@pushrocks/smartshell';
|
import * as smartshell from '@pushrocks/smartshell';
|
||||||
|
|
||||||
export { smartdelay, smartenv, smartshell };
|
export { smartdelay, smartshell };
|
||||||
|
|
||||||
// third party scope
|
// third party scope
|
||||||
import puppeteer from 'puppeteer';
|
import puppeteer from 'puppeteer';
|
||||||
|
Loading…
Reference in New Issue
Block a user