UNPKG

10.7 kBMarkdownView Raw
1# Changelog
2
3All notable changes to this project will be documented in this file.
4
5The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
8> - **Added** for new features.
9> - **Changed** for changes in existing functionality.
10> - **Deprecated** for soon-to-be removed features.
11> - **Removed** for now removed features.
12> - **Fixed** for any bug fixes.
13> - **Security** in case of vulnerabilities.
14
15## Unreleased
16
17- Add ability to create adaptors which provide access to external data sources
18- Add access to the Electricity Maps API free tier
19<!-- - _(Add a summary of your feature, and if relevant the issue, in your PR for merging into `main`)_ -->
20
21## Released
22
23### [0.15.0] - 2024-05-03
24
25#### Changed
26
27- Add access to more verbose data response from Greencheck API
28
29#### Removed
30
31- Removed Page X-ray specific functions:
32 - `perDomain`
33 - `perPage`
34 - `perContentType`
35 - `dirtiestResources`
36 - `perParty`
37
38### [0.14.4] - 2024-03-08
39
40#### Changed
41
42- Automated monthly update of annual average grid intensity data.
43
44#### Deprecated
45
46- Removing Page X-ray specific functions:
47 - `perDomain`
48 - `perPage`
49 - `perContentType`
50 - `dirtiestResources`
51 - `perParty`
52
53### [0.14.3] - 2024-02-21
54
55#### Changed
56
57- Automated monthly update of annual average grid intensity data.
58
59### [0.14.2] - 2024-01-29
60
61- Adds user agent header for requests to Green Web Foundation APIs
62
63### [0.14.1] - 2024-01-09
64
65#### Changed
66
67- Removed `index.d.ts` in favour of importing type definitions from `@types/tgwf__co2`.
68- Reduce package size by excluding files from publish NPM package.
69- Automated monthly update of annual average grid intensity data.
70
71### [0.13.10] - 2023-12-16
72
73#### Changed
74
75- Automated monthly update of annual average grid intensity data.
76
77### [0.13.9] - 2023-11-07
78
79#### Fixed
80
81- Fix to return expected results when variables with 0 value are passed into function
82
83#### Changed
84
85- Automated monthly update of annual average grid intensity data.
86
87### [0.13.8] - 2023-10-09
88
89#### Fixed
90
91- Properly use value of 0 for system segments and variables in the perByteTrace and perVisitTrace functions.
92
93#### Changed
94
95- Automated monthly update of annual average grid intensity data.
96
97### [0.13.7] - 2023-09-13
98
99#### Changed
100
101- Automated monthly update of annual average grid intensity data.
102
103### [0.13.6] - 2023-08-08
104
105#### Changed
106
107- Automated monthly update of annual average grid intensity data.
108- Create FUNDING.yml to allow sponsor contribution to this project.
109- Store segment flag on CO2 instance, not models.
110
111### [0.13.5] - 2023-07-5
112
113#### Changed
114
115- Automated monthly update of annual average grid intensity data.
116
117### [0.13.4] - 2023-05-24
118
119#### Fixed
120
121- Fixed an error when try to use global grid intensities in IIFE. (PR #147)
122
123### [0.13.3] - 2023-05-18
124
125#### Changed
126
127- Updated the global grid intensity constant to use the latest WORLD grid intensity value from Ember. (PR #142)
128
129### [0.13.2] - 2023-04-21
130
131- Fix to ensure that region names that are keys in the average annual grid intensity export are capitalised.
132
133### [0.13.1] - 2023-04-20
134
135#### Fixed
136
137- Fixed the import of average grid intensities in node. (PR #137)
138
139### [0.13.0] - 2023-04-13
140
141#### Changed
142
143In PR #135 there were significant changes made to how average annual grid intensities are fetched and generated.
144
145- Updated average annual grid intensities to include 2022 values from Ember.
146- Changed the functions to generate average grid intensities to:
147 - Fetch data directly from Ember's API.
148 - Get the _latest_ annual average values for each country/region.
149- Renamed the average grid intensities export file.
150
151### [0.12.2] - 2023-03-01
152
153#### Added
154
155- Add a module declaration for use from typescript (PR #131)
156
157#### Changed
158
159- Updated 2021 average annual grid intensity values (PR #133)
160
161### [0.12.1] - 2023-02-02
162
163#### Fixed
164
165- Removed incorrectly imported constants in tests.
166
167### [0.12.0] - 2023-02-02
168
169#### Added
170
171- Introduced two new functions `perByteTrace` and `perVisitTrace` which allow developers to pass an options object containing customised values for the constants used in the Sustainable Web Design model. (PR #126)
172
173#### Changed
174
175- Allowed developers now have the option to return a breakdown of carbon emissions estimates by system segment when using the Sustainable Web Design model. (PR #113)
176
177### [0.11.4] - 2022-12-02
178
179#### Fixed
180
181- Updated the `greenCheckMulti` function to work properly in ESM. (PR #123)
182
183### [0.11.3] - 2022-10-13
184
185#### Fixed
186
187- Corrected the Node export for the hosting raised in issue #110. (PR #118)
188
189### [0.11.2] - 2022-10-11
190
191#### Fixed
192
193- v0.11.x updates increased library size to 17MB + when published to NPM. This has been raised in [#108](https://github.com/thegreenwebfoundation/co2.js/issues/108) and it was found data files were being included in the published package. (PR #117)
194
195### [0.11.1] - 2022-10-07
196
197#### Changed
198
199- We have used generic filenames for data files, to avoid any confusion around the data being provided in this library. (PR #112)
200
201### [0.11.0] - 2022-10-03
202
203#### Added
204
205- Introduced average and marginal carbon intensity data into the library. This comes from [Ember Climate](https://ember-climate.org/data/data-explorer/) (for average carbon intensity data), and [The Green Web Foundation](https://developers.thegreenwebfoundation.org/co2js/data) (marginal intensity data, originally sourced from the UNFCCC - the United Nations Framework Convention on Climate Change). For more, [see our release guide for v0.11](https://www.thegreenwebfoundation.org/news/release-guide-co2-js-v0-11/) about the differences between the kinds of data. See [#64](https://github.com/thegreenwebfoundation/co2.js/issues/64), and [#97](https://github.com/thegreenwebfoundation/co2.js/issues/97) for more.
206- Added new paths to `import` and `require` the annual, country-level average and marginal carbon intensity data mentioned above like, as javascript objects, or as JSON. See [#104 for more](https://github.com/thegreenwebfoundation/co2.js/issues/104).
207- Added links to CO2.js in forms already available on CDNs to avoid needing to npm install it to try it out. See [#105 for more](https://github.com/thegreenwebfoundation/co2.js/issues/105).
208- Introduced scripts to automate the generation of grid intensity data based of Ember & UNFCCC source files.
209- Introduced a `release:minor` command, to automate the publishing process, to complement `release:patch`.
210
211#### Changed
212
213- Changed the default model for transfer based CO2 calculations from the _1byte_ model to the _Sustainable Web Design_ model instead. See <https://developers.thegreenwebfoundation.org/co2js/models/> for guidance on the differences and how to migrate between them. See [#94 for more](https://github.com/thegreenwebfoundation/co2.js/issues/94).
214- Updated our release commands to generate and format the carbon intensity data as part of the release process.
215
216### [0.10.4] - 2022-08-12
217
218#### Added
219
220- Introduced a `release:patch` command, to automate the publishing process. This is designed to make sure we always publish the most recent compiled code, by adding a rebuild step that can be easy to forget.
221
222### [0.10.3] - 2022-08-12
223
224#### Added
225
226- Introduced a new `perVisit()` function for the Sustainable Web Design model, which applies [caching and return visits assumptions](https://sustainablewebdesign.org/calculating-digital-emissions/).
227
228### [0.10.2] - 2022-08-12
229
230- Added the ability to set the model used by CO2.js to the Sustainable Web Design model, using a simple 'swd' string, instead of needing to pass in a class.
231
232### [0.10.1] - 2022-08-01
233
234This release used a version bump as previously we had released v0.10.0 under a pre-release tag.
235
236### [0.10.0] - 2022-06-27
237
238- Added ES import syntax as the main way for handling imports and exports of code within the module.
239- Changed eslint settings to use later version of ecmascript (2020)
240- Change the build tools to use esbulid with jest instead of babel
241- Added more consistent use of the debug logging library in files using the updated import syntax
242- Fixed the incorrect order of FIRST_TIME_VIEWING_PERCENTAGE and RETURNING_VISITOR_PERCENTAGE constants in the SWD model. This will result in **larger** values for calculations using the sustainable web design, and the default caching assumptions.
243
244### [0.9.0] - 2022-03-28
245
246#### Added
247
248- Added newly implemented Sustainable Web Design model [thanks @dryden!]
249- Added new readme page for using both emissions models
250- Added new source of data to the Sustainable Web Design model from Ember Climate.
251
252#### Changed
253
254- Changed the CO2 class to accept either the One Byte model or the Sustainable Web Design model
255
256#### Fixed
257
258- Fixed various typos.
259
260### [0.8.0] - 2021-11-28
261
262####  Fixed
263
264- Update further dependencies
265- Fix embarassing order of magnitude typo in 1byte model (thanks @mstaschik!)
266
267#### Added
268
269- Read JSON blob also as gzipped #44 (thanks @soulgalore)
270
271#### Changed
272
273- The 1byte model will give different numbers now. It's mentioned in `#fixed` but it's worth repeating.
274
275### [0.7.0] - 2021-11-28
276
277#### Fixed
278
279- Update tests to avoid network requests #50
280- Update dependencies across the board
281
282####  Changed
283
284- Switch to github actions instead of travis for CI.
285
286### [0.6.1] - 2020-03-15
287
288#### Fixed
289
290- Added the function to load JSON, on the tgwg.hosting object, for use in the sustaiable web sitespeed plugin.
291
292### [0.6.0] - 2020-03-15
293
294#### Added
295
296- Added the hosting-JSON for running local checks against an array instead of SQLite.
297
298#### Changed
299
300- Swapped out checking against a sqlite database `hosting-json`in favour of simple array in,
301- Updated conventions for style - using kebab-cases over CamelCase for naming files
302
303#### Removed
304
305- Extracted sqlite usage and dependencies into a separate module, `url2green`. This means you no longer need to compile SQLite on install.
306
307### [0.5.0] - 2020-03-03
308
309#### Changed
310
311- Updated README
312- Updated the emissions figured for green energy after further research on methodology with @@JamieBeevor
313- Incorporated class based CO2 models from @soulgalore
314- Credit contributors
315
316### [0.4.7] - 2020-03-02
317
318#### Added
319
320- Added a changelog at last!
321
322### [0.4.6] - 2020-03-01
323
324#### Added
325
326- Changelog inconsistency section in Bad Practices
327
328### [0.4.4] - 2020-03-01
329
330#### Added
331
332Added the (currently unused) green byte model.
333
334#### Changed
335
336Update the 1byte model to use an average of devices, rather than just wifi
337
338### [0.4.3] - 2020-03-01
339
340#### Added
341
342#### Changed
343
344Split hosting API into two separate files (one for sqlite, and one relying on the greencheck API)