home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

9 rows where issue = 776634318 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 1

  • simonw 9

issue 1

  • Mechanism for minifying JavaScript that ships with Datasette · 9 ✖

author_association 1

  • OWNER 9
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
754182058 https://github.com/simonw/datasette/issues/1164#issuecomment-754182058 https://api.github.com/repos/simonw/datasette/issues/1164 MDEyOklzc3VlQ29tbWVudDc1NDE4MjA1OA== simonw 9599 2021-01-04T19:53:31Z 2021-01-04T19:53:31Z OWNER

This will be helped by the new package.json added in #1170.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for minifying JavaScript that ships with Datasette 776634318  
753221362 https://github.com/simonw/datasette/issues/1164#issuecomment-753221362 https://api.github.com/repos/simonw/datasette/issues/1164 MDEyOklzc3VlQ29tbWVudDc1MzIyMTM2Mg== simonw 9599 2020-12-31T22:55:57Z 2020-12-31T22:55:57Z OWNER

I had to add this as the first line in table.min.js for the source mapping to work: //# sourceMappingURL=/-/static/table.min.js.map

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for minifying JavaScript that ships with Datasette 776634318  
753220665 https://github.com/simonw/datasette/issues/1164#issuecomment-753220665 https://api.github.com/repos/simonw/datasette/issues/1164 MDEyOklzc3VlQ29tbWVudDc1MzIyMDY2NQ== simonw 9599 2020-12-31T22:49:36Z 2020-12-31T22:49:36Z OWNER

I started with a 7K table.js file.

npx uglifyjs table.js --source-map -o table.min.js gave me a 5.6K table.min.js file.

npx uglifyjs table.js --source-map -o table.min.js --compress --mangle gave me 4.5K.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for minifying JavaScript that ships with Datasette 776634318  
753220412 https://github.com/simonw/datasette/issues/1164#issuecomment-753220412 https://api.github.com/repos/simonw/datasette/issues/1164 MDEyOklzc3VlQ29tbWVudDc1MzIyMDQxMg== simonw 9599 2020-12-31T22:47:36Z 2020-12-31T22:47:36Z OWNER

I'm trying to minify table.js and I ran into a problem:

Uglification failed. Unexpected character '`'

It turns out uglify-js doesn't support ES6 syntax!

But uglify-es does:

npm install uglify-es

Annoyingly it looks like uglify-es uses the same CLI command, uglifyjs. So after installing it this seemed to work:

npx uglifyjs table.js --source-map -o table.min.js

I really don't like how npx uglifyjs could mean different things depending on which package was installed.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for minifying JavaScript that ships with Datasette 776634318  
752769452 https://github.com/simonw/datasette/issues/1164#issuecomment-752769452 https://api.github.com/repos/simonw/datasette/issues/1164 MDEyOklzc3VlQ29tbWVudDc1Mjc2OTQ1Mg== simonw 9599 2020-12-30T21:50:16Z 2020-12-30T21:50:16Z OWNER

If I implement this I can automate the CodeMirror minification and remove the bit about running uglify-js against it from the documentation here: https://docs.datasette.io/en/0.53/contributing.html#upgrading-codemirror

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for minifying JavaScript that ships with Datasette 776634318  
752768785 https://github.com/simonw/datasette/issues/1164#issuecomment-752768785 https://api.github.com/repos/simonw/datasette/issues/1164 MDEyOklzc3VlQ29tbWVudDc1Mjc2ODc4NQ== simonw 9599 2020-12-30T21:47:06Z 2020-12-30T21:47:06Z OWNER

If I'm going to minify table.js I'd like to offer a source map for it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for minifying JavaScript that ships with Datasette 776634318  
752768652 https://github.com/simonw/datasette/issues/1164#issuecomment-752768652 https://api.github.com/repos/simonw/datasette/issues/1164 MDEyOklzc3VlQ29tbWVudDc1Mjc2ODY1Mg== simonw 9599 2020-12-30T21:46:29Z 2020-12-30T21:46:29Z OWNER

Running https://skalman.github.io/UglifyJS-online/ against https://github.com/simonw/datasette/blob/0.53/datasette/static/table.js knocks it down from 7810 characters to 4643.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for minifying JavaScript that ships with Datasette 776634318  
752757075 https://github.com/simonw/datasette/issues/1164#issuecomment-752757075 https://api.github.com/repos/simonw/datasette/issues/1164 MDEyOklzc3VlQ29tbWVudDc1Mjc1NzA3NQ== simonw 9599 2020-12-30T21:01:27Z 2020-12-30T21:01:27Z OWNER

I don't want Datasette contributors to need a working Node.js install to run the tests or work on Datasette unless they are explicitly working on the JavaScript.

I think I'm going to do this with a unit test that runs only if upglify-js is available on the path and confirms that the *.min.js version of each script in the repository correctly matches the results from running uglify-js against it.

That way if anyone checks in a change to JavaScript but forgets to run the minifier the tests will fail in CI.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for minifying JavaScript that ships with Datasette 776634318  
752756612 https://github.com/simonw/datasette/issues/1164#issuecomment-752756612 https://api.github.com/repos/simonw/datasette/issues/1164 MDEyOklzc3VlQ29tbWVudDc1Mjc1NjYxMg== simonw 9599 2020-12-30T20:59:54Z 2020-12-30T20:59:54Z OWNER

I tried a few different pure-Python JavaScript minifying libraries and none of them produced results as good as https://www.npmjs.com/package/uglify-js for the plugin code I'm considering in #983.

So I think I'll need to rely on a Node.js tool for this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for minifying JavaScript that ships with Datasette 776634318  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Queries took 15.887ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows