1 | # Changelog
|
2 |
|
3 | All notable changes to this project will be documented in this file.
|
4 |
|
5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6 | and 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 |
|
20 |
|
21 | ## Released
|
22 |
|
23 | ### [0.14.2] - 2024-01-29
|
24 |
|
25 | - Adds user agent header for requests to Green Web Foundation APIs
|
26 |
|
27 | ### [0.14.1] - 2024-01-09
|
28 |
|
29 | #### Changed
|
30 |
|
31 | - Removed `index.d.ts` in favour of importing type definitions from `@types/tgwf__co2`.
|
32 | - Reduce package size by excluding files from publish NPM package.
|
33 | - Automated monthly update of annual average grid intensity data.
|
34 |
|
35 | ### [0.13.10] - 2023-12-16
|
36 |
|
37 | #### Changed
|
38 |
|
39 | - Automated monthly update of annual average grid intensity data.
|
40 |
|
41 | ### [0.13.9] - 2023-11-07
|
42 |
|
43 | #### Fixed
|
44 |
|
45 | - Fix to return expected results when variables with 0 value are passed into function
|
46 |
|
47 | #### Changed
|
48 |
|
49 | - Automated monthly update of annual average grid intensity data.
|
50 |
|
51 | ### [0.13.8] - 2023-10-09
|
52 |
|
53 | #### Fixed
|
54 |
|
55 | - Properly use value of 0 for system segments and variables in the perByteTrace and perVisitTrace functions.
|
56 |
|
57 | #### Changed
|
58 |
|
59 | - Automated monthly update of annual average grid intensity data.
|
60 |
|
61 | ### [0.13.7] - 2023-09-13
|
62 |
|
63 | #### Changed
|
64 |
|
65 | - Automated monthly update of annual average grid intensity data.
|
66 |
|
67 | ### [0.13.6] - 2023-08-08
|
68 |
|
69 | #### Changed
|
70 |
|
71 | - Automated monthly update of annual average grid intensity data.
|
72 | - Create FUNDING.yml to allow sponsor contribution to this project.
|
73 | - Store segment flag on CO2 instance, not models.
|
74 |
|
75 | ### [0.13.5] - 2023-07-5
|
76 |
|
77 | #### Changed
|
78 |
|
79 | - Automated monthly update of annual average grid intensity data.
|
80 |
|
81 | ### [0.13.4] - 2023-05-24
|
82 |
|
83 | #### Fixed
|
84 |
|
85 | - Fixed an error when try to use global grid intensities in IIFE. (PR #147)
|
86 |
|
87 | ### [0.13.3] - 2023-05-18
|
88 |
|
89 | #### Changed
|
90 |
|
91 | - Updated the global grid intensity constant to use the latest WORLD grid intensity value from Ember. (PR #142)
|
92 |
|
93 | ### [0.13.2] - 2023-04-21
|
94 |
|
95 | - Fix to ensure that region names that are keys in the average annual grid intensity export are capitalised.
|
96 |
|
97 | ### [0.13.1] - 2023-04-20
|
98 |
|
99 | #### Fixed
|
100 |
|
101 | - Fixed the import of average grid intensities in node. (PR #137)
|
102 |
|
103 | ### [0.13.0] - 2023-04-13
|
104 |
|
105 | #### Changed
|
106 |
|
107 | In PR #135 there were significant changes made to how average annual grid intensities are fetched and generated.
|
108 |
|
109 | - Updated average annual grid intensities to include 2022 values from Ember.
|
110 | - Changed the functions to generate average grid intensities to:
|
111 | - Fetch data directly from Ember's API.
|
112 | - Get the _latest_ annual average values for each country/region.
|
113 | - Renamed the average grid intensities export file.
|
114 |
|
115 | ### [0.12.2] - 2023-03-01
|
116 |
|
117 | #### Added
|
118 |
|
119 | - Add a module declaration for use from typescript (PR #131)
|
120 |
|
121 | #### Changed
|
122 |
|
123 | - Updated 2021 average annual grid intensity values (PR #133)
|
124 |
|
125 | ### [0.12.1] - 2023-02-02
|
126 |
|
127 | #### Fixed
|
128 |
|
129 | - Removed incorrectly imported constants in tests.
|
130 |
|
131 | ### [0.12.0] - 2023-02-02
|
132 |
|
133 | #### Added
|
134 |
|
135 | - 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)
|
136 |
|
137 | #### Changed
|
138 |
|
139 | - 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)
|
140 |
|
141 | ### [0.11.4] - 2022-12-02
|
142 |
|
143 | #### Fixed
|
144 |
|
145 | - Updated the `greenCheckMulti` function to work properly in ESM. (PR #123)
|
146 |
|
147 | ### [0.11.3] - 2022-10-13
|
148 |
|
149 | #### Fixed
|
150 |
|
151 | - Corrected the Node export for the hosting raised in issue #110. (PR #118)
|
152 |
|
153 | ### [0.11.2] - 2022-10-11
|
154 |
|
155 | #### Fixed
|
156 |
|
157 | - 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)
|
158 |
|
159 | ### [0.11.1] - 2022-10-07
|
160 |
|
161 | #### Changed
|
162 |
|
163 | - We have used generic filenames for data files, to avoid any confusion around the data being provided in this library. (PR #112)
|
164 |
|
165 | ### [0.11.0] - 2022-10-03
|
166 |
|
167 | #### Added
|
168 |
|
169 | - 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.
|
170 | - 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).
|
171 | - 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).
|
172 | - Introduced scripts to automate the generation of grid intensity data based of Ember & UNFCCC source files.
|
173 | - Introduced a `release:minor` command, to automate the publishing process, to complement `release:patch`.
|
174 |
|
175 | #### Changed
|
176 |
|
177 | - 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).
|
178 | - Updated our release commands to generate and format the carbon intensity data as part of the release process.
|
179 |
|
180 | ### [0.10.4] - 2022-08-12
|
181 |
|
182 | #### Added
|
183 |
|
184 | - 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.
|
185 |
|
186 | ### [0.10.3] - 2022-08-12
|
187 |
|
188 | #### Added
|
189 |
|
190 | - Introduced a new `perVisit()` function for the Sustainable Web Design model, which applies [caching and return visits assumptions](https://sustainablewebdesign.org/calculating-digital-emissions/).
|
191 |
|
192 | ### [0.10.2] - 2022-08-12
|
193 |
|
194 | - 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.
|
195 |
|
196 | ### [0.10.1] - 2022-08-01
|
197 |
|
198 | This release used a version bump as previously we had released v0.10.0 under a pre-release tag.
|
199 |
|
200 | ### [0.10.0] - 2022-06-27
|
201 |
|
202 | - Added ES import syntax as the main way for handling imports and exports of code within the module.
|
203 | - Changed eslint settings to use later version of ecmascript (2020)
|
204 | - Change the build tools to use esbulid with jest instead of babel
|
205 | - Added more consistent use of the debug logging library in files using the updated import syntax
|
206 | - 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.
|
207 |
|
208 | ### [0.9.0] - 2022-03-28
|
209 |
|
210 | #### Added
|
211 |
|
212 | - Added newly implemented Sustainable Web Design model [thanks @dryden!]
|
213 | - Added new readme page for using both emissions models
|
214 | - Added new source of data to the Sustainable Web Design model from Ember Climate.
|
215 |
|
216 | #### Changed
|
217 |
|
218 | - Changed the CO2 class to accept either the One Byte model or the Sustainable Web Design model
|
219 |
|
220 | #### Fixed
|
221 |
|
222 | - Fixed various typos.
|
223 |
|
224 | ### [0.8.0] - 2021-11-28
|
225 |
|
226 | #### Fixed
|
227 |
|
228 | - Update further dependencies
|
229 | - Fix embarassing order of magnitude typo in 1byte model (thanks @mstaschik!)
|
230 |
|
231 | #### Added
|
232 |
|
233 | - Read JSON blob also as gzipped #44 (thanks @soulgalore)
|
234 |
|
235 | #### Changed
|
236 |
|
237 | - The 1byte model will give different numbers now. It's mentioned in `#fixed` but it's worth repeating.
|
238 |
|
239 | ### [0.7.0] - 2021-11-28
|
240 |
|
241 | #### Fixed
|
242 |
|
243 | - Update tests to avoid network requests #50
|
244 | - Update dependencies across the board
|
245 |
|
246 | #### Changed
|
247 |
|
248 | - Switch to github actions instead of travis for CI.
|
249 |
|
250 | ### [0.6.1] - 2020-03-15
|
251 |
|
252 | #### Fixed
|
253 |
|
254 | - Added the function to load JSON, on the tgwg.hosting object, for use in the sustaiable web sitespeed plugin.
|
255 |
|
256 | ### [0.6.0] - 2020-03-15
|
257 |
|
258 | #### Added
|
259 |
|
260 | - Added the hosting-JSON for running local checks against an array instead of SQLite.
|
261 |
|
262 | #### Changed
|
263 |
|
264 | - Swapped out checking against a sqlite database `hosting-json`in favour of simple array in,
|
265 | - Updated conventions for style - using kebab-cases over CamelCase for naming files
|
266 |
|
267 | #### Removed
|
268 |
|
269 | - Extracted sqlite usage and dependencies into a separate module, `url2green`. This means you no longer need to compile SQLite on install.
|
270 |
|
271 | ### [0.5.0] - 2020-03-03
|
272 |
|
273 | #### Changed
|
274 |
|
275 | - Updated README
|
276 | - Updated the emissions figured for green energy after further research on methodology with @@JamieBeevor
|
277 | - Incorporated class based CO2 models from @soulgalore
|
278 | - Credit contributors
|
279 |
|
280 | ### [0.4.7] - 2020-03-02
|
281 |
|
282 | #### Added
|
283 |
|
284 | - Added a changelog at last!
|
285 |
|
286 | ### [0.4.6] - 2020-03-01
|
287 |
|
288 | #### Added
|
289 |
|
290 | - Changelog inconsistency section in Bad Practices
|
291 |
|
292 | ### [0.4.4] - 2020-03-01
|
293 |
|
294 | #### Added
|
295 |
|
296 | Added the (currently unused) green byte model.
|
297 |
|
298 | #### Changed
|
299 |
|
300 | Update the 1byte model to use an average of devices, rather than just wifi
|
301 |
|
302 | ### [0.4.3] - 2020-03-01
|
303 |
|
304 | #### Added
|
305 |
|
306 | #### Changed
|
307 |
|
308 | Split hosting API into two separate files (one for sqlite, and one relying on the greencheck API)
|