New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@datagraphics/baker

Package Overview
Dependencies
Maintainers
5
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datagraphics/baker - npm Package Versions

1
7

0.34.0

Diff

Changelog

Source

[0.34.0] - 2021-06-23

Changed

  • The Nunjucks engine now uses FileSystemLoader for node_modules imports (very similar to how Sass engine works via includePaths), instead of deferring to NodeResolveLoader. That loader is not nearly as useful when npm installed packages use the new "export": { ... } format. Unless packages explicitly declare the non-JS exports you're unable to find them. I don't think we were using that anyway, so it's NBD.
rdm
published 0.33.0 •

Changelog

Source

[0.33.0] - 2021-05-05

Added

  • It is now possible to pass compiler options to Svelte via svelteCompilerOptions in baker.config.js. Good for the rare case of when you need to render them as hydratable.
rdm
published 0.32.1 •

Changelog

Source

[0.32.1] - 2021-04-27

Fixed

  • Our custom Rollup datasetPlugin and dataPlugin have been moved to before @rollup/plugin-node-resolve in the Rollup plugin list. In some cases nodeResolve would misinterpret the *: prefix and blow up the path before these plugins got a chance to do it first.
rdm
published 0.32.0 •

Changelog

Source

[0.32.0] - 2021-04-14

Changed

  • The {% static %} tag will now pass through full URLs as-is when used as the parameter. This lets developers not have to worry about whether a path is project relative or not in loops, and allows templates that work with files to easily account for local and remote files.
rdm
published 0.31.2 •

Changelog

Source

[0.31.2] - 2021-02-22

Added

  • Add preventAssignment: true to @rollup/plugin-replace options.

Fixed

  • Make sure process.exit(1) is called when builds fail.
rdm
published 0.31.1 •

Changelog

Source

[0.31.1] - 2021-01-31

Fixed

  • Pathing for Svelte CSS also needs to account for path prefixes or else it will be resolved incorrectly in HTML that's not at the root.
rdm
published 0.31.0 •

Changelog

Source

[0.31.0] - 2021-01-22

Added

  • Thanks to @web/rollup-plugin-import-meta-assets it's now possible to import paths to files within JavaScript and have that be enough to ensure that the file is added to the build. This is yet another method for loading data in baker projects, and likely the best one yet.
// Rollup will see this and understand it should add this file to your build
const url = new URL('./data/cities.json', import.meta.url);

// load it and go!
const data = await d3.json(url);

Changed

  • The Nunjucks environment is now allowed to cache templates in production mode. Probably won't change much speed wise, but ever so slightly more efficient.
rdm
published 0.30.0 •

Changelog

Source

[0.30.0] - 2021-01-18

Added

A new experimental custom Rollup plugin has been added that provides an optimized method for importing data files in JavaScript. If a JSON, CSV, or TSV file is imported using the prefix dataset:* it will be added to the bundle either directly as an Object or Array literal (if under 10K in size) or rendered as a string within a JSON.parse call.

It has been documented that parsing a string within JSON.parse is much, much faster on average than directly passing in JavaScript, and typically this is the very first step when data is being loaded manually (with d3-fetch's json or csv functions, etc.). This makes it possible to import (or even better — dynamically import) data without having to deploy it as a file or inject it into HTML to be parsed.

An example of how to use it:

import data from 'dataset:./assets/data.json';
// or dynamically
const data = await import('dataset:./assets/data.json');
rdm
published 0.29.0 •

Changelog

Source

[0.29.0] - 2021-01-13

Added

  • CSS within Svelte components is now supported. This means any CSS that's written within Svelte components will be included in the {% script %} entrypoint bundle that is added to a page.
  • Additional variables are now available on the page template context object (previously current_page) - in addition to page.absoluteUrl, page.url represents the project-relative URL. page.inputPath represents the project-relative path to the original input template, and page.outputPath represents the project-relative output path.

Changed

  • The file watcher logic is now a little smarter and keeps track of dependencies directly in the engines (except for Rollup, which manages this itself). This is a small step toward having a much richer dependency graph for builds.
  • The current_page template context object has been renamed to page. current_page however will continue to exist until 1.0.
rdm
published 0.28.0 •

Changelog

Source

[0.28.0] - 2020-12-30

Added

  • It's now possible to supply custom tags ({% custom variable1, variable2 %}) to Nunjucks via the baker.config.js file. It is very similar to how you add custom filters.

How to add one:

// baker.config.js
module.exports = {
  // ...
  nunjucksTags: {
    author(firstName, lastName) {
      return `<p class="author">By ${firstName} ${lastName}</p>`;
    },
  },
};

How to use one:

{% author "Arthur", "Barker" %}

Heads up! Nunjucks requires a comma between arguments.

And the output:

<p class="author">By Arthur Barker</p>

Changed

  • Async nunjucks tags now must return a Promise. This abstracts away some of Nunjucks' warts and the expectation of a callback to enable async tags.
  • Because the built-in inject tag was async it now returns a Promise to match the new interface.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc