Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ampproject/worker-dom
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.29.2
Choose a base ref
...
head repository: ampproject/worker-dom
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.29.3
Choose a head ref
  • 5 commits
  • 5 files changed
  • 2 contributors

Commits on Apr 26, 2021

  1. Update all (#1049)

    renovate-bot authored Apr 26, 2021
    Copy the full SHA
    3efa121 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fd862e5 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e08c069 View commit details

Commits on May 5, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3bdf0d2 View commit details
  2. v0.29.3

    samouri committed May 5, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4dfaa1c View commit details
Showing with 46 additions and 17 deletions.
  1. +22 −0 config/rollup.worker-thread.js
  2. +4 −4 demo/preact-map/package.json
  3. +4 −4 demo/react-map/package.json
  4. +9 −9 package.json
  5. +7 −0 src/worker-thread/server-lib.ts
22 changes: 22 additions & 0 deletions config/rollup.worker-thread.js
Original file line number Diff line number Diff line change
@@ -31,6 +31,28 @@ const compilePlugins = [
// So, here we continue to use the '.mjs' extension to indicate newer ECMASCRIPT support
// but ensure the code can be run within a worker by putting it inside a named iife.
const ESModules = [
{
input: 'output/worker-thread/server-lib.js',
output: {
file: 'dist/server-lib.mjs',
format: 'es',
name: 'ServerLib',
sourcemap: true,
},
plugins: [
replace({
values: {
WORKER_DOM_DEBUG: false,
},
preventAssignment: true,
}),
babelPlugin({
transpileToES5: false,
allowConsole: false,
}),
...compilePlugins,
],
},
{
input: 'output/worker-thread/index.js',
output: {
8 changes: 4 additions & 4 deletions demo/preact-map/package.json
Original file line number Diff line number Diff line change
@@ -13,14 +13,14 @@
"preact": "10.5.13"
},
"devDependencies": {
"@babel/core": "7.13.15",
"@babel/core": "7.13.16",
"@babel/preset-env": "7.13.15",
"@babel/plugin-transform-react-jsx": "7.13.12",
"babel-loader": "8.2.2",
"css-loader": "5.2.1",
"mini-css-extract-plugin": "1.4.1",
"css-loader": "5.2.4",
"mini-css-extract-plugin": "1.5.0",
"style-loader": "2.0.0",
"webpack": "5.31.2",
"webpack": "5.35.1",
"webpack-cli": "4.6.0"
},
"volta": {
8 changes: 4 additions & 4 deletions demo/react-map/package.json
Original file line number Diff line number Diff line change
@@ -14,14 +14,14 @@
"react-dom": "17.0.2"
},
"devDependencies": {
"@babel/core": "7.13.15",
"@babel/core": "7.13.16",
"@babel/preset-env": "7.13.15",
"@babel/plugin-transform-react-jsx": "7.13.12",
"babel-loader": "8.2.2",
"css-loader": "5.2.1",
"mini-css-extract-plugin": "1.4.1",
"css-loader": "5.2.4",
"mini-css-extract-plugin": "1.5.0",
"style-loader": "2.0.0",
"webpack": "5.31.2",
"webpack": "5.35.1",
"webpack-cli": "4.6.0"
},
"volta": {
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ampproject/worker-dom",
"version": "0.29.2",
"version": "0.29.3",
"description": "A facsimile of a modern DOM implementation intended to run in a Web Worker.",
"main": "dist/main",
"files": [
@@ -39,16 +39,16 @@
"devDependencies": {
"@ampproject/filesize": "4.3.0",
"@ampproject/rollup-plugin-closure-compiler": "0.26.0",
"@babel/cli": "7.13.14",
"@babel/core": "7.13.15",
"@babel/cli": "7.13.16",
"@babel/core": "7.13.16",
"@babel/plugin-proposal-class-properties": "7.13.0",
"@babel/plugin-proposal-object-rest-spread": "7.13.8",
"@babel/preset-env": "7.13.15",
"@rollup/plugin-replace": "2.4.2",
"@types/node": "14.14.37",
"@types/sinon": "9.0.11",
"acorn": "8.1.0",
"acorn-walk": "8.0.2",
"@types/node": "14.14.41",
"@types/sinon": "10.0.0",
"acorn": "8.2.1",
"acorn-walk": "8.1.0",
"ava": "3.15.0",
"babel-plugin-minify-replace": "0.5.0",
"babel-plugin-transform-remove-console": "6.9.4",
@@ -58,12 +58,12 @@
"jsdom": "16.5.3",
"lint-staged": "10.5.4",
"magic-string": "0.25.7",
"np": "7.4.0",
"np": "7.5.0",
"npm-run-all": "4.1.5",
"polka": "0.5.2",
"prettier": "2.2.1",
"rimraf": "3.0.2",
"rollup": "2.45.1",
"rollup": "2.45.2",
"rollup-plugin-analyzer": "4.0.0",
"rollup-plugin-babel": "4.4.0",
"rollup-plugin-terser": "7.0.2",
7 changes: 7 additions & 0 deletions src/worker-thread/server-lib.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Document } from './dom/Document';
import { GlobalScope } from './WorkerDOMGlobalScope';

export function createDocument() {
const win: GlobalScope = {} as any;
return new Document(win);
}